鏡像自
https://bitbucket.org/s_l_teichmann/mtsatellite
已同步 2025-10-17 10:45:26 +02:00
Only use the transparent image generation if there where any transparent blocks.
此提交包含在:
@@ -166,7 +166,8 @@ func (r *Renderer) Reset() {
|
||||
r.yMin[i] = math.MinInt32
|
||||
}
|
||||
|
||||
if r.tBuffer != nil {
|
||||
if r.TransparentBlocks > 0 {
|
||||
r.TransparentBlocks = 0
|
||||
for i, t := range r.tBuffer {
|
||||
if t != nil {
|
||||
r.spans.FreeAll(t)
|
||||
@@ -174,6 +175,8 @@ func (r *Renderer) Reset() {
|
||||
}
|
||||
}
|
||||
}
|
||||
r.SolidBlocks = 0
|
||||
r.RejectedBlocks = 0
|
||||
}
|
||||
|
||||
func (r *Renderer) IsFilled() bool {
|
||||
@@ -416,7 +419,7 @@ func (r *Renderer) CreateShadedImage(
|
||||
|
||||
pix := image.Pix
|
||||
|
||||
if r.tBuffer != nil { // Fast path for transparent images.
|
||||
if r.TransparentBlocks > 0 { // Fast path for transparent images.
|
||||
for z := height - 1; z >= 0; z-- {
|
||||
for x := 0; x < width; x++ {
|
||||
colIdx := r.cBuffer[ofs]
|
||||
|
新增問題並參考
封鎖使用者