OSDN Git Service

Properly scale text
authorRomain Guy <romainguy@google.com>
Wed, 27 Feb 2013 03:10:14 +0000 (19:10 -0800)
committerRomain Guy <romainguy@google.com>
Wed, 27 Feb 2013 23:49:57 +0000 (15:49 -0800)
commitc74f45a334f0e3725c23cdd270cbcb0efac4ea75
tree1b198e8b6b7d6d4a69237116a580236836744294
parentd80806b305ce337283c24f14522cc58fea090b8c
Properly scale text

This change does not apply to drawPosText() and drawTextOnPath() yet.

Prior to this change, glyphs were always rasterized based on the
font size specified in the paint. All transforms were then applied
on the resulting texture. This creates rather ugly results when
text is scaled and/or rotated.

With this change, the font renderer will apply the current transform
matrix to the glyph before they are rasterized. This generates much
better looking results.

Change-Id: I0141b6ff18db35e1213e7a3ab9db1ecaf03d7a9c
libs/hwui/Matrix.cpp
libs/hwui/Matrix.h
libs/hwui/OpenGLRenderer.cpp
libs/hwui/OpenGLRenderer.h
libs/hwui/font/Font.cpp
libs/hwui/font/Font.h
tests/HwAccelerationTest/AndroidManifest.xml
tests/HwAccelerationTest/src/com/android/test/hwui/ScaledTextActivity.java