mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 17:27:08 +08:00
1 parent
0322995771
commit
677396c71d
12 files changed
+377
-64
No files matched your search
+13
-5
@@ -95,12 +95,20 @@ func (r *Renderer) renderCompositeGraphicUnit(ctx *canvas.Context, cgu Composite
|
||||
return
|
||||
}
|
||||
ctx.Push()
|
||||
currentCTM := NewMatrix(cgu.CTM)
|
||||
if parentCTM != nil {
|
||||
currentCTM = parentCTM.Multiply(currentCTM)
|
||||
}
|
||||
box, _ := ParseBox(cgu.Boundary)
|
||||
clipPath := intersectClipPath(parentClip, r.buildClipPath(cgu.Clips, pageH, box.X, box.Y, currentCTM))
|
||||
boundaryCTM := TranslationMatrix(box.X, box.Y)
|
||||
if parentCTM != nil {
|
||||
boundaryCTM = parentCTM.Multiply(boundaryCTM)
|
||||
}
|
||||
currentCTM := boundaryCTM.Multiply(NewMatrix(cgu.CTM))
|
||||
clips, clipCTM := cgu.Clips, currentCTM
|
||||
if clips != nil && clips.TransFlag != nil && !*clips.TransFlag {
|
||||
// 不参与对象CTM的裁剪仍位于对象边界及父级坐标系中
|
||||
clipCopy := *clips
|
||||
clipCopy.TransFlag = nil
|
||||
clips, clipCTM = &clipCopy, boundaryCTM
|
||||
}
|
||||
clipPath := intersectClipPath(parentClip, r.buildClipPath(clips, pageH, 0, 0, clipCTM))
|
||||
if cgu.ResourceID != "" {
|
||||
if ref, ok := r.CompositeGraphicUnits[cgu.ResourceID]; ok {
|
||||
refCopy := *ref
|
||||
|
||||
Reference in new issue
Block a user