Loading tools/layoutlib/bridge/src/android/graphics/Paint_Delegate.java +25 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,7 @@ public class Paint_Delegate { private float mTextSize; private float mTextScaleX; private float mTextSkewX; private int mHintingMode = Paint.HINTING_ON; private Xfermode_Delegate mXfermode; private ColorFilter_Delegate mColorFilter; Loading Loading @@ -269,6 +270,28 @@ public class Paint_Delegate { setFlag(thisPaint, Paint.FILTER_BITMAP_FLAG, filter); } @LayoutlibDelegate /*package*/ static int getHinting(Paint thisPaint) { // get the delegate from the native int. Paint_Delegate delegate = sManager.getDelegate(thisPaint.mNativePaint); if (delegate == null) { return Paint.HINTING_ON; } return delegate.mHintingMode; } @LayoutlibDelegate /*package*/ static void setHinting(Paint thisPaint, int mode) { // get the delegate from the native int. Paint_Delegate delegate = sManager.getDelegate(thisPaint.mNativePaint); if (delegate == null) { return; } delegate.mHintingMode = mode; } @LayoutlibDelegate /*package*/ static void setAntiAlias(Paint thisPaint, boolean aa) { setFlag(thisPaint, Paint.ANTI_ALIAS_FLAG, aa); Loading Loading @@ -1098,6 +1121,7 @@ public class Paint_Delegate { mPathEffect = paint.mPathEffect; mMaskFilter = paint.mMaskFilter; mRasterizer = paint.mRasterizer; mHintingMode = paint.mHintingMode; updateFontObject(); } Loading @@ -1121,6 +1145,7 @@ public class Paint_Delegate { mMaskFilter = null; mRasterizer = null; updateFontObject(); mHintingMode = Paint.HINTING_ON; } /** Loading Loading
tools/layoutlib/bridge/src/android/graphics/Paint_Delegate.java +25 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,7 @@ public class Paint_Delegate { private float mTextSize; private float mTextScaleX; private float mTextSkewX; private int mHintingMode = Paint.HINTING_ON; private Xfermode_Delegate mXfermode; private ColorFilter_Delegate mColorFilter; Loading Loading @@ -269,6 +270,28 @@ public class Paint_Delegate { setFlag(thisPaint, Paint.FILTER_BITMAP_FLAG, filter); } @LayoutlibDelegate /*package*/ static int getHinting(Paint thisPaint) { // get the delegate from the native int. Paint_Delegate delegate = sManager.getDelegate(thisPaint.mNativePaint); if (delegate == null) { return Paint.HINTING_ON; } return delegate.mHintingMode; } @LayoutlibDelegate /*package*/ static void setHinting(Paint thisPaint, int mode) { // get the delegate from the native int. Paint_Delegate delegate = sManager.getDelegate(thisPaint.mNativePaint); if (delegate == null) { return; } delegate.mHintingMode = mode; } @LayoutlibDelegate /*package*/ static void setAntiAlias(Paint thisPaint, boolean aa) { setFlag(thisPaint, Paint.ANTI_ALIAS_FLAG, aa); Loading Loading @@ -1098,6 +1121,7 @@ public class Paint_Delegate { mPathEffect = paint.mPathEffect; mMaskFilter = paint.mMaskFilter; mRasterizer = paint.mRasterizer; mHintingMode = paint.mHintingMode; updateFontObject(); } Loading @@ -1121,6 +1145,7 @@ public class Paint_Delegate { mMaskFilter = null; mRasterizer = null; updateFontObject(); mHintingMode = Paint.HINTING_ON; } /** Loading