Repository navigation
Fix documentation errors in Android.Graphics.Pdf.Component and Android.Graphics.Pdf.Content (R089, pass 3) - #1968
Conversation
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>
There was a problem hiding this comment.
🟢 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
|
@dalexsoto review |
|
In response to @jonathanpeppers's request: I have inspected the single changed hunk in |
dalexsoto
left a comment
There was a problem hiding this comment.
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.
Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
1e2b493305a58d1112822624bffef0de23df6678↑ Line 67 uses postConcat, which supports the new "concatenates after the current matrix" text.
↑ XML parses;
git diff --checkis 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.ComponentandAndroid.Graphics.Pdf.Content. Pinned sources: Androidsource-37.2_r01; managed code dotnet/android 9bc18c75.Fix
PdfPageObject.Transformsummary 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}withMatrix.setValues(Android indexes 0 scale X, 1 skew X, 2 translate X, 3 skew Y, 4 scale Y, 5 translate Y) and then callspostConcaton the current matrix. The stated layout putsc,e,b,dat 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 newPathcopy.PdfPagePathObject.SetFillColor/SetStrokeColor: "cannot be transparent" and "no effect if render mode is not …".PdfPageTextObject.SetFillColor/SetStrokeColor: "no effect if render mode is not …".PdfPageTextObjectFontSymbol family: "does not support bold or italic".PdfPageTextContent(string, IList<RectF>)throwsIllegalArgumentExceptionfor an empty list (PdfPageTextContent.java:63); the docs do not mention it (omission only).PdfPageTextObjectconstructor 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.