mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 17:27:08 +08:00
1 parent
9c5ce1d66f
commit
ac198f3351
56 files changed
+3029
-825
No files matched your search
@@ -129,6 +129,15 @@ func (c *semanticCompiler) addImage(img image.Image, matrix Matrix, clip *Geomet
|
||||
if box.X <= visible.X && box.Y <= visible.Y && visible.X+visible.W <= box.X+box.W && visible.Y+visible.H <= box.Y+box.H {
|
||||
clip = nil
|
||||
}
|
||||
} else {
|
||||
bounds := img.Bounds()
|
||||
outline, err := geometryRectangle(Box{X: float64(bounds.Min.X), Y: float64(bounds.Min.Y), W: float64(bounds.Dx()), H: float64(bounds.Dy())}).Transform(matrix)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if geometryConvexContains(*clip, outline) {
|
||||
clip = nil
|
||||
}
|
||||
}
|
||||
}
|
||||
if clip != nil {
|
||||
|
||||
Reference in new issue
Block a user