mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 08:46:55 +08:00
This commit is contained in:
1 parent
5d1fd593cd
commit
f8263f798f
21 files changed
+1029
-336
No files matched your search
@@ -206,14 +206,7 @@ func (c *pdfCompositor) geometry(node pdfCompositeNode, stroke bool) (pdfComposi
|
||||
c.cache.bounds[key] = geometry.box
|
||||
cost := 256
|
||||
if geometry.scene != nil {
|
||||
for _, command := range geometry.scene.Commands {
|
||||
part := rasterCommandCost(command)
|
||||
if part <= 0 || part > cache.limit-cost {
|
||||
cost = cache.limit + 1
|
||||
break
|
||||
}
|
||||
cost += part
|
||||
}
|
||||
cost += rasterCommandsCost(geometry.scene.Commands, cache.limit-cost)
|
||||
}
|
||||
cache.put(sceneKey, geometry, cost)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user