Commit Graph
100 Commits
Author SHA1 Message Date
BobLd b923a42f9e Check if CurrentSubpath null before CloseSubpath 2020-04-05 17:58:57 +01:00
BobLd 20c4b9594b Rename PdfSubpath.ClosePath() to PdfSubpath.CloseSubpath() to avoid confusion 2020-04-05 17:58:57 +01:00
BobLd 04300eb12c Add PdfSubpath comment 2020-04-05 17:58:57 +01:00
BobLd 401c4484b5 remove static for local function (recommended by VS2019) 2020-04-05 17:58:57 +01:00
BobLd 064fa4922a make Clipping internal
do not throw errors when CurrentPath is null
modify tests to match
2020-04-05 17:58:57 +01:00
BobLd 51165dc11a Implement EndPath
Make path clipping optional
2020-04-05 17:58:57 +01:00
BobLd a7fe39fc32 Add SvgTextExporter
Modify WriteSvg to account for height
2020-04-05 17:58:57 +01:00
BobLd 983cfcb2f6 Simplify path construction operators
fix 're' operator to reflect documentation
Update ContentStreamProcessor with fill, stroke and clip operations
Throw errors when currentPosition is null in PdfSubpath
2020-04-05 17:58:57 +01:00
BobLd 3ee9ac7915 Implement FillStrokePath() operator and filling rule. 2020-04-05 17:58:57 +01:00
BobLd 5eb2cc507e Add CurrentClippingPath to CurrentGraphicsState 2020-04-05 17:58:57 +01:00
BobLd 83ef10ec22 Add Clipping helper class. Does nothing for the moment 2020-04-05 17:58:57 +01:00
BobLd 43b40da5d5 Change Subpath to path where necessary 2020-04-05 17:58:57 +01:00
BobLd 002d8dc06d Move Path-Painting Operators to PathPainting folder 2020-04-05 17:58:57 +01:00
BobLd c4a077bbbb Add IsFilled and IsStroked flags
Add CloneEmpty() and GetBoundingRectangle()methods
2020-04-05 17:58:57 +01:00
BobLd 2b68547131 Moving PdfPath from PdfPig.Core to PdfPig
Add FillColor, StrokeColor, LineWidth, LineDashPattern and LineCapStyle to PdfPath.
2020-04-05 17:58:57 +01:00
BobLd 6677641b37 Create PdfPath
Rename ClippingRule to FillingRule
Move FillingRule from Subpath to Path
2020-04-05 17:58:57 +01:00
BobLd ab6a0f11fc Change name from PdfPath to PdfSubpath 2020-04-05 17:58:57 +01:00
BobLd 7d52bc8be4 make Distances.FindIndexNearest public
add tests for Distances.FindIndexNearest
2020-03-24 19:52:01 +00:00
BobLd 8460b8bc1d Add test for Mode(float) 2020-03-24 19:52:01 +00:00
BobLd 0d786a1265 Add tests for KdTree, MathExtensions and Distances
Add reference to DLA project
Make KdTree public
Fix mode computation for multimodal
2020-03-24 19:52:01 +00:00
BobLd 5f0ddf131e make OrientedBoundingBox public 2020-03-24 19:52:01 +00:00
BobLd c1a1fa1f7f - fix minimum area rectangle algo and make it public
- add tests
- tidy up code
2020-03-15 17:20:36 +01:00
BobLd 9366aa2b37 Tidy up code 2020-03-15 15:39:19 +01:00
BobLd 5b8a2f2e38 handle k-nearest neighbours search
update DocstrumBB with kd-tree
2020-03-15 15:39:19 +01:00
BobLd 8cafda3577 handle nearest neighbour not found 2020-03-15 15:39:19 +01:00
BobLd 439dad9f35 fix depth for leaves 2020-03-06 16:53:18 +00:00
BobLd dbdef7f195 kd-tree 2020-03-06 16:53:18 +00:00
BobLd c4309ef31e fix kd-tree 2020-03-06 16:53:18 +00:00
BobLd 1e1a33d46e fix typo in kd-tree
replace Count() by Count or Length
2020-03-06 16:53:18 +00:00
BobLd e477bc8d6d Tidy up and optimise kd-tree 2020-03-06 16:53:18 +00:00
BobLd 5ae38f1bad Improve default max function 2020-02-28 14:43:18 +00:00
BobLd 0afaa19d15 Handle null CurrentPath 2020-02-24 11:20:56 +00:00
BobLd 74413fa6a4 Add PdfPath.IsCounterClockwise tests 2020-02-24 11:20:56 +00:00
BobLd 1d095af974 Implement Modify Clipping operations 2020-02-24 11:20:56 +00:00
BobLd b0eaccf56f Add PdfRectangle.Contains(PdfRectangle) and tests 2020-02-23 14:44:35 +00:00
BobLd 8e5aaf068d use MemberData for all Geometry tests 2020-02-23 11:23:27 +00:00
BobLd bbdb778d5e use Count == 0 i.o. !Any() 2020-02-23 11:23:27 +00:00
BobLd 514a5eff20 use MemberData in PdfRectangle.Area tests 2020-02-23 11:23:27 +00:00
BobLd 41c8af0de4 use MemberData in PdfRectangle.Rotate tests 2020-02-23 11:23:27 +00:00
BobLd c6669679d6 use MemberData in Line.Length tests 2020-02-23 11:23:27 +00:00
BobLd 1b15238e31 avoid creating PdfLines in IntersectsWith 2020-02-23 11:23:27 +00:00
BobLd 49caa071ba improve length computation
tidy up IntersectsWith()
2020-02-23 11:23:27 +00:00
BobLd 7d7a7fc5ee remove useless code 2020-02-23 11:23:27 +00:00
BobLd 42245d70ca Improve PdfRectangle.GetWidthHeight();
Improve and simplify Word's oriented bounding box
2020-02-23 11:23:27 +00:00
BobLd 67c5abf2b6 fix Intersect(BezierCurve, Line) and add tests 2020-02-23 11:23:27 +00:00
BobLd 2878e74017 Add bezier curve test 2020-02-23 11:23:27 +00:00
BobLd 36566f42e6 Create generic methods for lines in GeometryExtensions 2020-02-23 11:23:27 +00:00
BobLd 6fe0ef0351 Add line tests and improve GeometryExtensions 2020-02-23 11:23:27 +00:00
BobLd b8d1eba8ee PdfLine.Insersect() 2020-02-23 11:23:27 +00:00
BobLd d2ac2f598a update Centroid, GetWidthHeight and tests 2020-02-23 11:23:27 +00:00
BobLd 2c8c6cda87 add GeometryExtensions tests 2020-02-23 11:23:27 +00:00
BobLd 848d687910 Add kd tree and improve clustering 2020-02-19 11:12:54 +00:00
BobLd 3229574345 Correcting typo 2020-02-12 12:00:14 +00:00
BobLd 6a72ce655c Merge branch 'master' of https://github.com/UglyToad/PdfPig into rxycut-stackoverflow 2020-02-12 11:40:51 +00:00
BobLd f0be3e99ee Add Projection class 2020-02-11 10:04:04 +00:00
BobLd dd8baa0d2f Fix stack overflow error in RecursiveXYCut
Was linked to the new rotated rectangle methods
2020-02-10 13:53:59 +00:00
BobLd b49740d093 add test for index increment when children are present 2020-02-10 11:23:19 +00:00
BobLd ec68231ab3 remove useless using 2020-02-10 11:23:19 +00:00
BobLd ac1e2c49ba Fix bounding box for artifact
Add tests
2020-02-10 11:23:19 +00:00
BobLd 588648d30b Fix #133 Marked content extraction issue 2020-02-10 11:23:19 +00:00
BobLd 6dfc7aea30 add test for index increment when children are present 2020-02-09 18:01:18 +00:00
BobLd f66c25103f remove useless using 2020-02-09 17:54:20 +00:00
BobLd 905559e282 Fix bounding box for artifact
Add tests
2020-02-09 17:46:35 +00:00
BobLd 635693f032 Fix #133 Marked content extraction issue 2020-02-09 15:23:55 +00:00
BobLd f05101ad07 TransformationMatrix: add comment and improve multiplication 2020-02-09 14:20:47 +00:00
BobLd 1a11e49124 Add TransformationMatrix.Inverse() tests 2020-02-09 14:20:47 +00:00
BobLd df73206788 try rerun failed tests 2020-02-09 14:20:47 +00:00
BobLd 6a86cdab73 make GeometryExtensions.OrientedBoundingBox() internal 2020-02-09 14:20:47 +00:00
BobLd 288beab39d limit access to array and add comments 2020-02-09 14:20:47 +00:00
BobLd 7364e53bb9 Improve bounding box for word 2020-02-09 14:20:47 +00:00
BobLd 6dce4b1f8d Use double.NaN instead of double.MinValue
Only compute t, cos and sin once
2020-01-31 16:24:59 +00:00
BobLd 0e613fb526 Handle cases with not enough points in minimal bounding rectangle 2020-01-31 16:24:59 +00:00
BobLd 4c65cbc139 Improve minimum bounding box orientation v2 2020-01-31 16:24:59 +00:00
BobLd bff18d81ca Improve minimum bounding box orientation 2020-01-31 16:24:59 +00:00
BobLd 483b30f44d Remove rounding 2020-01-31 16:24:59 +00:00
BobLd 253ae32193 Remove ordering from minimal bounding rectangle 2020-01-31 16:24:59 +00:00
BobLd 0dad611cb1 Implement minimum bounding box algorithm 2020-01-31 16:24:59 +00:00
BobLd 36c03459a7 first and last letter 2020-01-31 16:24:59 +00:00
BobLd f221b58936 Remove useless code 2020-01-31 16:24:59 +00:00
BobLd ea27820ca4 Improve Word bounding box TextDirection.Other case 2020-01-31 16:24:59 +00:00
BobLd 2e5fdb5867 Fix PdfRectangle's Centroid and Translate() 2020-01-31 16:24:59 +00:00
BobLd 380c36918b Remove unnecessary code 2020-01-31 16:24:59 +00:00
BobLd 0cbf3434bc Remove 'orderFunc' from 'NearestNeighbourWordExtractor' to use the order found by clustering algo 2020-01-31 16:24:59 +00:00
BobLd 3b90370f28 Using Math.Min(letter.Width, letter.GlyphRectangle.Width) for rotated 180 word bounding box 2020-01-31 16:24:59 +00:00
BobLd c4b6bbc8e5 Using Math.Max(letter.Width, letter.GlyphRectangle.Width) for word bounding box 2020-01-31 16:24:59 +00:00
BobLd 6d8744e722 More decimals to Width and Height
+ handle the case where both bottom points are identical
2020-01-31 16:24:59 +00:00
BobLd bc69376743 Increase max distance for TextDirection.Other in NearestNeighbourWordExtractor 2020-01-31 16:24:59 +00:00
BobLd a326d7e9d9 TextDirection.Unknown -> TextDirection.Other
Imporve NearestNeighbourWordExtractor for TextDirection.Other
2020-01-31 16:24:59 +00:00
BobLd 9bcafdaa98 Update word bounding box computation 2020-01-31 16:24:59 +00:00
BobLd 27edf6cf77 Handle Width and Height for rotated rectangles 2020-01-31 16:24:59 +00:00
BobLd 75bd94e538 Better handling of TextDirection.Unknown word bounding box 2020-01-31 16:24:59 +00:00
BobLd 75821919a7 Fix NearestNeighbourWordExtractor for rotated text 2020-01-31 16:24:59 +00:00
BobLd 47672d3f90 Make TextBlock.SetReadingOrder(int) public 2020-01-13 09:25:57 +00:00
BobLd e8216b29c5 Add reading order in PageXml export 2020-01-12 11:15:58 +00:00
BobLd e7417be75a ReadingOrderDetector and tidying DLA project 2020-01-11 11:18:11 +00:00
BobLd 097692f1cb Move ArtifactType inside PdfArtifactMarkedContent 2020-01-09 11:24:32 +00:00
BobLd 7be36fdc58 Update PublicApiScannerTests 2 2020-01-08 11:07:27 +00:00
BobLd 4b929482cc Update PublicApiScannerTests 2020-01-08 10:46:49 +00:00
BobLd 49d836c5cb Add description to GetMarkedContents() 2020-01-08 10:36:58 +00:00
BobLd 84bab1b627 Add basic marked content extraction capabilities 2020-01-08 10:34:01 +00:00