mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-30 01:27:26 +08:00
1 parent
5dcd7a4e8d
commit
6c14eef1ee
39 files changed
+1926
-420
No files matched your search
+1
-12
@@ -68,21 +68,10 @@ func (p *pdfImporter) disjointText(node pdfCompositeNode) (bool, error) {
|
||||
}
|
||||
var box Box
|
||||
for _, command := range scene.Commands {
|
||||
path := geometryFromRaster(command.Path)
|
||||
if command.Image != nil {
|
||||
b := command.Image.Bounds()
|
||||
path = geometryRectangle(Box{X: float64(b.Min.X), Y: float64(b.Min.Y), W: float64(b.Dx()), H: float64(b.Dy())})
|
||||
}
|
||||
path, err = geometry.Transform(path, MatrixFromValues([6]float64(command.Transform)))
|
||||
path, err := rasterCommandGeometry(geometry, command)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
if command.Stroke != nil {
|
||||
path, err = geometry.Stroke(path, *command.Stroke)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
}
|
||||
path, err = geometry.Transform(path, MatrixFromValues([6]float64(inverse)))
|
||||
if err != nil {
|
||||
return false, err
|
||||
|
||||
Reference in new issue
Block a user