Addresses a regression in Calendar where a custom drawable that doesn't
implement intrinsic bounds is laid out incorrectly. Also fixes an issue
where ColorDrawable would be laid out incorrectly.
Bug: 20643614
Change-Id: I796f0d3e189e482cf6fa169a5dd13f654d72653c
For correct low-level drawing of low level text, a method that
includes context for shaping is necessary, and it's similarly useful
to provide the direction explicitly rather than running the BiDi
algorithm on the text. The drawTextRun method (in both char[] and
CharSequence variants) has provided this functionality for several
major releases but has been internal. This patch exposes the
methods publicly, and also improves the doc strings for both
the new method and some related ones.
Bug: 20193553
Change-Id: I9be33ca5ae3e7db2b69a56298400671d5ef8ad05
Failing to check the return result from intersect() can cause artifacts
because the developer may assume that the rect has been changed to the intersection.
In particular, when the two rects do not overlap, there is no change made to the
source rect. Instead, the method simply returns false. When developers do not
check that return value, they may use the source rect and get undefined results.
This change adds the @CheckResults annotation that will cause a Lint warning
when developers call this method without checking the return value.
Change-Id: I476367d74e712038c248c2379fb124734298fcc1
Adds explicit padding attributes to LayerDrawable, constrains the ripple
to fit within the container to avoid projection.
Bug: 19359934
Bug: 20083467
Change-Id: I46da941fba37552adeb2c1fe617b799f576df0c6
Adds methods to Paint for finding an offset corresponding to an
advance, and for finding the advance corresponding to an offset,
useful for positioning and drawing a cursor.
Change-Id: Id57402ddd1980650f1d0d2f8bbdb75e43612ec51
Switch a few places to using android::canvas
instead of SkCanvas as well which eliminated
some JNI
Change-Id: I8f98b56442a06362b82b984cd1bd3a92398d8dbc
Stop assuming that a Java Bitmap has a SkBitmap* that
has some externally managed lifecycle, and instead switch
a bunch of users to accessing the bitmap by providing
their own SkBitmap* on which to set the (ref counted!)
SkPixelRef* instead
Change-Id: I0fd9e193968b41e5597784140d56b4885906864a
This patch adds a method to determine whether a typeface has a glyph
to support a particular Unicode character or sequence.
The implementation is based on shaping the text and checking for the
presence of .notdef glyphs, and counting the number of glyphs in the
ligature case. In the case of variation selector control characters, it
currently just returns false because there is no variation selector
support yet (Mongolian Free Variation Selectors work because they're
shaped with GSUB instead).
Change-Id: I8ee4ae0d6e81a0ac57f961eb02dcc35aabd87042
Originally, stroke width is independent of group scaling.
But that is a bug and causing animation trouble.
b/19501782
Change-Id: I33d5e44f2f8b2a82fee1a5a326223a39aaffa86c
The cursor position calculation of not well known CharSequence implementation
has problem. getTextRunCursor() returns the relative path of passed string
buffer, so need to fix the origin by adding the copied buffer origin.
BUG: 17448027
Change-Id: I413c553bfccbccee4a390b6c83aa09ac7fd04126
Issue #17140095 Drawable#getOpacity() is documented as ignoring custom alpha, e.g. setAlpha(). It is lying.
Change-Id: Iaef094be750c58a43e13491e7bf9d9b7e56e23d2