Skip to content

Fix documentation errors in Android.Graphics.Pdf.Component and Android.Graphics.Pdf.Content (R089, pass 3) - #1968

Merged
jonathanpeppers merged 1 commit into
mainfrom
jonathanpeppers-review-pdf-component-content-docs
Nov 28, 2026
Merged

jonathanpeppers merged 1 commit into
mainfrom
jonathanpeppers-review-pdf-component-content-docs

Conversation

@jonathanpeppers

@jonathanpeppers jonathanpeppers commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: 1e2b493305a58d1112822624bffef0de23df6678

Dimension Assessment Rationale
Change confidence 9/10 ↑ Pinned PdfPageObject.java:66 stores the coefficients as {a, e, d, c, b, f}, which contradicts the removed layout text.
↑ Line 67 uses postConcat, which supports the new "concatenates after the current matrix" text.
↑ XML parses; git diff --check is clean; Gemini rubber-duck review found no doc errors.
↓ Native PDFium behavior is not in the pinned Java sources, so verbatim upstream claims about render-time effects stay unverified (listed below).

Pass-3 review of R089: 28 files in Android.Graphics.Pdf.Component and Android.Graphics.Pdf.Content. Pinned sources: Android source-37.2_r01; managed code dotnet/android 9bc18c75.

Fix

PdfPageObject.Transform summary and first remarks paragraph said the matrix is composed as |a c e| / |b d f|. The pinned implementation stores {a, e, d, c, b, f, 0, 0, 1} with Matrix.setValues (Android indexes 0 scale X, 1 skew X, 2 translate X, 3 skew Y, 4 scale Y, 5 translate Y) and then calls postConcat on the current matrix. The stated layout puts c, e, b, d at the wrong indexes. The new text says the method concatenates the transformation after the current matrix and points to the parameter docs, which already give the correct index of each coefficient. The same Javadoc text is in AOSP MediaProvider main (March 2025), so this is not a version difference.

Uncertain (not changed)

These are verbatim upstream Javadoc claims that the pinned Java sources cannot prove or disprove, because the behavior is in native PDFium code:

  • FreeTextAnnotation.TextColor: "alpha is always 1". The Java setter stores the full color unchanged.
  • PdfPagePathObject.ToPath: "might be an approximation" and "path is immutable". The Java method returns a new Path copy.
  • PdfPagePathObject.SetFillColor / SetStrokeColor: "cannot be transparent" and "no effect if render mode is not …". PdfPageTextObject.SetFillColor / SetStrokeColor: "no effect if render mode is not …".
  • PdfPageTextObjectFont Symbol family: "does not support bold or italic".
  • PdfPageTextContent(string, IList<RectF>) throws IllegalArgumentException for an empty list (PdfPageTextContent.java:63); the docs do not mention it (omission only).
  • PdfPageTextObject constructor sets render mode to Fill only when the edit-page-objects flag is on; otherwise it stays Unknown. The docs do not state a default.

R085 lead: no doc in scope claims that a page add or update operation returns -1 or false.

Ledger

478 AI-changed channels: 160 verbatim upstream text, 142 correct (AI text checked against cited lines), 2 verbatim notes not provable from Java, 6 uncertain, 2 fixed, 166 binding boilerplate deferred per kickoff. Every row states the current text and the numeric pinned source lines. All crefs in the 28 files resolve to existing DocIds.

The summary and remarks stated the layout |a c e| / |b d f|. The pinned implementation stores the coefficients as {a, e, d, c, b, f} at Matrix indexes 0-5 and concatenates the result after the current matrix. Replace the wrong layout text; the parameter docs already give each index.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 28, 2026 09:25
@jonathanpeppers
jonathanpeppers enabled auto-merge (squash) November 28, 2026 09:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

There are no active review issues for this documentation-only correction.

No open issues 🎉

What changed in this PR

This PR corrects the PdfPageObject.Transform documentation in the Android PDF bindings, removing an inaccurate matrix layout and clarifying transformation order.

Changes:

  • Replaces the incorrect matrix layout with a concise summary.
  • Clarifies that the transformation is concatenated after the current matrix and directs readers to the parameter descriptions for coefficient indexes.
File Description
docs/​xml/​Android.Graphics.Pdf.Component/​PdfPageObject.xml Corrects the Transform summary and remarks; no API or runtime changes.

Review effort: Balanced

@jonathanpeppers

Copy link
Copy Markdown
Member Author

@dalexsoto review

@dalexsoto

Copy link
Copy Markdown
Member

In response to @jonathanpeppers's request: I have inspected the single changed hunk in PdfPageObject.xml. I still need to independently check PdfPageObject.transform(float, float, float, float, float, float) in the pinned Android 37.2 source: specifically the {a, e, d, c, b, f} coefficient mapping, Matrix.postConcat order, and the matching managed binding. The description provides useful source pointers, but I have not independently read those implementations yet. This is a reviewer coverage gap, not a confirmed defect in the PR; the source check is queued for the next monitoring tick. No API failure occurred.

@dalexsoto dalexsoto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the PdfPageObject.Transform documentation against the pinned AOSP sources (PdfPageObject.java and Matrix.java in source-37.2_r01, plus MediaProvider jni_conversion.cc) and the generated binding (JNI (FFFFFF)V, parameters a–f). The removed |a c e| / |b d f| layout was indeed wrong: the implementation calls setValues({a, e, d, c, b, f, 0, 0, 1}) and then postConcat, so the new summary/remarks and the per-parameter index mapping are accurate for every shipped version. No blocking issues found. Static source review only.

@jonathanpeppers
jonathanpeppers merged commit 5c2e4f2 into main Nov 28, 2026
4 checks passed
@jonathanpeppers
jonathanpeppers deleted the jonathanpeppers-review-pdf-component-content-docs branch November 28, 2026 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants