This patch wires up getStringBounds to do the layout with Minikin to get
accurate bounds, and with the correct typeface. It fixes bug 15416575
"getStringBounds gives wrong result in Minikin".
Change-Id: I5c020bc372acb1d785a33c3c296239c151bd8c87
This patch improves the Minikin integration in a number of ways,
including:
Software rendering does text decorations and handles alignment
correctly. This fixes bug 15139067 "Centered text isn't working".
Paint implements getTextPath. This fixes bug 15143354 "Text rendering in
Maps Navigation wrong typeface?"
Also a bit of refactoring, since there was duplicated code for iterating
font runs that's now a static method in MinikinUtils.
Change-Id: I4cfdb2c0559982376348325a757d95235fab1768
These are discouraged anyway, due to the fact that using them may
result in decoding on the UI thread. Now that they are ignored, the
images will still be decoded; they just will never have their
memory purged, meaning there could be a RAM penalty. This is
acceptable, since apps are encouraged to instead use inBitmap to
manage bitmap memory.
This incidentally fixes BUG:15390468 by converting purgeable index8
(e.g. gif) images to non purgeable.
Change-Id: Ieaf3ab25d28d93fb94bdaea1eb3bd762f163b09a
The fill used to be dafault as "none".
Now it is default to opaque black, which is consistent with svg now.
So it is better to always set the fill value.
bug:15288554
Change-Id: I07ac41c5adc77665e66e52f2c0220139586fb09b
Removes APIs for themed creation of a drawable from a stream, since
that doesn't involve any inflation. Also cleans up tinting methods
left over from previous clean up.
BUG: 15089957
Change-Id: I2af7aa9a6d351ae61b33ee1216c674fae1bffe11
Signed-off-by: Alan Viverette <alanv@google.com>
This patch adds the fallback font list to custom typefaces created from
files and assets, as well as those created by name. This is a fix for
the deskclock half of bug 15139067 "Centered text isn't working".
Change-Id: I0cc60951953dfb73817a98ddfee5713f0387ee90
Also updates background and button colors to match spec, removes
dependency on bouncycastle Arrays. Vastly simplifies ripple drawing.
Adds APIs for maximum ripple radius. Makes selectableItemBackground
bounded by default and adds an unbounded version and theme attribute.
BUG: 15315168
BUG: 15314684
BUG: 15314830
BUG: 15316768
BUG: 15333033
BUG: 15344050
Change-Id: Ib0619587ce78e43056b66571bae185e0f1613185
Instead of storing a direct SkCanvas reference, Canvas now tracks
an opaque native wrapper class. The native wrapper can be used to
store additional info for emulating deprecated Skia features
(at this point it only stores a canvas).
Some notes:
* all native handle -> SkCanvas conversions are routed through a
handful of native utility methods.
* safeCanvasSwap() refactored as a lower level setNativeBitmp() - which
is what clients need.
* removed unused get_thread_msec() (Canvas.cpp)
Change-Id: I715a5a6f1e1621c1cfc1e510ae4f2ea15cf11114
This is the frameworks/base side of what's needed to support language
selection (especially Han unification, but also compact/elegant
selection for scripts that require more vertical space).
This is part of the fix for bug 15179652 "Japanese font isn't shown on
LMP".
Change-Id: I8f0f3aa9a1915659f8d0b590cf1c56529356049a
The clipRegion(Region) API exposed a different semantic than all other clip APIs by not
respecting the current matrix. The same behavior can be achieved by calling clipRect(Rect)
on the Rects within a Region.
bug: 14650725
Change-Id: I7e91813b8e2474f327e070e549fa303d66f8b552
Also update the 3rd test to correctly testing clipping.
Removing some naive tests which rotate 360 or 0.
bug:15288554
Change-Id: I436e8e494cb78fc665a3890171a1af87367db419
This adds the new delegates that were missing. This starts the work on
changes related to Minikin Fonts.
There are some changes related to TypedArray that still need to be
fixed.
Change-Id: Ic2397b64aa3f1f48926e849b14689c47d9ee7f8c
(cherry picked from commit 7ca3612094270183243938e79337c84effea7ad0)
This is the first step, including:
1. Bring the group tag back by reverting.
2. If there is no group tag, then treat all the paths as a single group.
Make sure our test cases covering both cases.
At the same time, fix one tiny UI bug in the test.
TODO:
1. Move the rotation to the group tag.
2. Add translation/scale to the group tag.
3. Convert the group into a tree hierarchy.
This reverts commit 404211630ba3bb865109434aba4433e7541b39d3.
Conflicts:
graphics/java/android/graphics/drawable/VectorDrawable.java
Change-Id: Ife65bb6a7fc85f9947124b8e356cd5b82119796a