summaryrefslogtreecommitdiff
path: root/core/fpdfapi/edit/cpdf_pagecontentgenerator.h
AgeCommit message (Collapse)Author
2017-09-18Convert string class namesRyan Harrison
Automated using git grep & sed. Replace StringC classes with StringView classes. Remove the CFX_ prefix and put string classes in fxcrt namespace. Change AsStringC() to AsStringView(). Rename tests from TEST(fxcrt, *String*Foo) to TEST(*String*, Foo). Couple of tests needed to have their names regularlized. BUG=pdfium:894 Change-Id: I7ca038685c8d803795f3ed02545124f7a224c83d Reviewed-on: https://pdfium-review.googlesource.com/14151 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2017-08-31Remove fx_basic.hDan Sinclair
This CL removes the fx_basic.h header and fixes up includes as needed. Change-Id: I49af32a8327bdbcda40c50a61ffbd75d06609040 Reviewed-on: https://pdfium-review.googlesource.com/12670 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-06-28Set default graphics before generating page contentsNicolas Pena
In this CL, the content generator sets some default graphics states before processing the page objects. In particular, a default ExtGState is now set before processing, and the last CTM is now stored right after parsing finishes: the only command to change matrix is ctm, and it concatenates, so inverting requires knowing the current value. Bug: pdfium:779 Change-Id: I35b1c07550ce91839fb0e20fbf717e3e80c9b9d6 Reviewed-on: https://pdfium-review.googlesource.com/7070 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-06-27Modified CPDF_PageContentGenerator to work with both Form and PageJane Liu
CPDF_PageContentGenerator currently only works for CPDF_Page objects. However, CPDF_Form is also a CPDF_PageObjectHolder like CPDF_Page, and content streams can be generated for form objects too. This CL modifies the content generator to work with both forms and pages. The content generator will later be used on annotation objects' CPDF_Form to simplify the code for annotation AP stream generation. Change-Id: I1c50bdf0329d1f5788db23286ac72750355a10ed Reviewed-on: https://pdfium-review.googlesource.com/6837 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
2017-06-13Converting CFX_ByteTextBuf to ostringstream in cpdf_pagecontentgenerator.Henrique Nakashima
Bug: pdfium:731 Change-Id: If606359bd9264a6f440871ab824ab54a4efae901 Reviewed-on: https://pdfium-review.googlesource.com/6450 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-06-01Fix content generation to only generate dirty page objects.wileyrya
BUG=pdfium:717 R=dsinclair@chromium.org,thestig@chromium.org Change-Id: I7e0e6fd301d40f9b5341d40cf11167b7748af243 Reviewed-on: https://pdfium-review.googlesource.com/6071 Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-05-24Convert to CFX_UnownedPtr, part 8chromium/3110Tom Sepez
Change-Id: I99d6b4df72e369652301c36e4046f03ef95ed07d Reviewed-on: https://pdfium-review.googlesource.com/5837 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-02-15Move generated graphics and font maps to CPDF_PageNicolas Pena
A new CPDF_PageContentGenerator is created for every call of FPDFPage_GenerateContent, so having the maps there will cause duplicated resources to be created every time this method is called. Thus it is better to move these to the page. Change-Id: I47804f79790fc5354f8a94b6387d66b65eda5a20 Reviewed-on: https://pdfium-review.googlesource.com/2717 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>
2017-02-14Add ProcessText supporting standard fontsNicolas Pena
BUG=pdfium:667 Change-Id: I701719144127881ebdb5be01a51e833d1e576477 Reviewed-on: https://pdfium-review.googlesource.com/2691 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: dsinclair <dsinclair@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-21Clean up CPDF_PageContentGenerator.thestig
Review-Url: https://codereview.chromium.org/2513313002
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-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-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_edit to core/fpdfapi/editdsinclair
BUG=pdfium:603 Review-Url: https://codereview.chromium.org/2386263003