summaryrefslogtreecommitdiff
path: root/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp
AgeCommit message (Collapse)Author
2017-02-10Add line width option for stroking pathschromium/3011chromium/3010chromium/3009Nicolas Pena
BUG=pdfium:661 Change-Id: Ie1dc82a1323a35ebbd63a5b7b8f8c95f9a5325fe Reviewed-on: https://pdfium-review.googlesource.com/2613 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>
2017-02-07Use enum class for PathPoint types.Nicolas Pena
This hopefully makes it less confusing what the description of a point is. Currently we have defines for the types, which is confusing because a point can only be one of the three. And it is mixed up with whether the point is closing a figure or not. Change-Id: Icd71355d69c77b3d52ca78e03bc379081ff87753 Reviewed-on: https://pdfium-review.googlesource.com/2552 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-02-06Add support for fill and stroke RGBA in CPDF_PageContentGeneratorNicolas Pena
CPDF_PageObject is a CPDF_GraphicStates, which allows us to add graphics information to the object itself. The RGB can be added easily in the stream. The alpha parameter needs to be in a dictionary contained in the ExtGState, which should be part of the page's resources. BUG=pdfium:661 Change-Id: Id99b2ece7aa201e3550c765ac2b5eeff4b43fc48 Reviewed-on: https://pdfium-review.googlesource.com/2530 Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>
2017-02-02Add CPDF_PageContentGenerator::ProcessPath supporting path constructionNicolas Pena
See Table 4.9 for path construction operators. Ignoring v, y, because those can be replaced with the more powerful c operator. The code added will be called by public methods that do not exist yet. BUG=pdfium:661 Change-Id: I9a1ad3fd0a601e4e3a292b55f3e5708fe0c9c8fb Reviewed-on: https://pdfium-review.googlesource.com/2495 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2016-11-21Make CPDF_ImageObject::m_Matrix private.thestig
Review-Url: https://codereview.chromium.org/2514263003
2016-11-21Make CPDF_Stream() take unique_ptr's to its dictionary.tsepez
Review-Url: https://codereview.chromium.org/2520493002
2016-11-21Clean up CPDF_PageContentGenerator.thestig
Review-Url: https://codereview.chromium.org/2513313002
2016-11-18Make CPDF_Dictionary use unique pointers.chromium/2926tsepez
Some changes were required to match underlying ctors as invoked by the templated methods. Many release() calls go away, a few WrapUniques() are introduced to avoid going deeper into other code. Review-Url: https://codereview.chromium.org/2510223002
2016-11-16Make CPDF_Object subclass constructors intern stringstsepez
Make CDPF_Arrays intern the object they create. Allow passing nullptr as a CFX_WeakPtr shortcut as well. Review-Url: https://codereview.chromium.org/2509123002
2016-11-15Make AddIndirectObject() take a unique_ptr.tsepez
Add convenience routines to create and add object in one step. Review-Url: https://codereview.chromium.org/2489283003
2016-11-14Make CPDF_PageContentGenerator methods take object numberstsepez
This patch fixes a possibility that an owned CPDF_Stream is handed to the indirect object holder inside RealizeResource(). Its arguments are changed to take an object number, as is done elsewhere in the code, to suggest that only indirect objects are acceptable. BUG=660756 Review-Url: https://codereview.chromium.org/2489423002
2016-11-11Fix sevg above CPDF_PageContentGenerator::ProcessImage()tsepez
Adds a test to process an image for which a stream hasn't been set. BUG=660756 Review-Url: https://codereview.chromium.org/2494683007
2016-10-14Revert "Update CPDF_IndirectObjectHolder APIs for unique objects."Tom Sepez
This reverts commit 3ba098595ae56b64eacc0c25ab76b89a4d78d920. TBR=thestig@chromium.org,weili@chromium.org Review URL: https://codereview.chromium.org/2424533003 .
2016-10-14Update CPDF_IndirectObjectHolder APIs for unique objects.tsepez
Doing so highlights a few places where ownership is dubious. Add convenience functions to return an unowned reference to a newly-created indirect object. Review-Url: https://codereview.chromium.org/2419173002
2016-10-12Get rid of CFX_ArrayTemplate<CPDF_Object*>tsepez
They won't work with std::unique_ptr down the road, so replace with std::vector. Review-Url: https://codereview.chromium.org/2411703003
2016-10-11Rename fpdf_page_doc.cpp -> cpdf_docpagedata.htsepez
Review-Url: https://codereview.chromium.org/2409283002
2016-10-04Move core/fpdfapi/fpdf_parser to core/fpdfapi/parserdsinclair
BUG=pdfium:603 Review-Url: https://codereview.chromium.org/2392603004
2016-10-04Move core/fpdfapi/fpdf_page to core/fpdfapi/pagedsinclair
BUG=pdfium:603 Review-Url: https://codereview.chromium.org/2386423004
2016-10-04Move core/fpdfapi/fpdf_edit to core/fpdfapi/editdsinclair
BUG=pdfium:603 Review-Url: https://codereview.chromium.org/2386263003