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
@@ -30,6 +30,8 @@ type semanticCompiler struct {
|
||||
measurement ObjectMeasurement
|
||||
measure, contours, textOnly, pattern bool
|
||||
patterns *renderCache[patternCellKey, []RasterCommand]
|
||||
patternReferences map[*Pattern]bool
|
||||
patternPage *Matrix
|
||||
}
|
||||
|
||||
// semanticStyle 保存已继承的路径颜色和描边参数
|
||||
@@ -466,11 +468,16 @@ func (c *semanticCompiler) fillPattern(clip GeometryPath, pattern *PatternPaint,
|
||||
matrix := NewMatrix(pattern.CTM)
|
||||
if pattern.RelativeTo != "Page" {
|
||||
matrix = object.Multiply(matrix)
|
||||
} else if c.patternPage != nil {
|
||||
matrix = c.patternPage.Multiply(matrix)
|
||||
}
|
||||
inverse, ok := matrix.Invert()
|
||||
if !ok {
|
||||
return fmt.Errorf("invalid pattern transform")
|
||||
}
|
||||
if pattern.CellContent.empty() {
|
||||
return nil
|
||||
}
|
||||
box, err := c.geometry.Bounds(clip)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in new issue
Block a user