File tree Expand file tree Collapse file tree 2 files changed +24
-15
lines changed Expand file tree Collapse file tree 2 files changed +24
-15
lines changed Original file line number Diff line number Diff line change @@ -328,9 +328,16 @@ export class Paint {
328
328
set textSize ( value : number ) {
329
329
this . _native . setTextSize ( value ) ;
330
330
}
331
+ get textSize ( ) {
332
+ return this . getTextSize ( ) ;
333
+ }
334
+ public getTextSize ( ) : number {
335
+ return this . _native . getTextSize ( ) ;
336
+ }
331
337
public setTypeface ( font : Font | android . graphics . Typeface ) : Font {
332
338
if ( font instanceof Font ) {
333
- this . fontInternal = font ;
339
+ this . setFont ( font ) ;
340
+ return this . fontInternal ; ;
334
341
} else if ( font ) {
335
342
this . fontInternal [ '_typeface' ] = font ;
336
343
} else {
Original file line number Diff line number Diff line change @@ -829,20 +829,7 @@ export class Paint implements IPaint {
829
829
// path._path = bPath.CGPath;
830
830
}
831
831
public setFilterBitmap ( param0 : boolean ) { }
832
- public setTypeface ( font : Font | UIFont ) : Font {
833
- if ( this . font === font ) {
834
- return this . _font ;
835
- }
836
- if ( font instanceof Font ) {
837
- this . _font = font ;
838
- } else if ( font ) {
839
- this . _font [ '_uiFont' ] = font ;
840
- } else {
841
- this . _font = null ;
842
- }
843
- this . _textAttribs = null ;
844
- return this . _font ;
845
- }
832
+
846
833
public setTextAlign ( align : Align ) : void {
847
834
this . align = align ;
848
835
this . _textAttribs = null ;
@@ -972,6 +959,21 @@ export class Paint implements IPaint {
972
959
this . _font = font ;
973
960
this . _textAttribs = null ;
974
961
}
962
+ public setTypeface ( font : Font | UIFont ) : Font {
963
+ if ( this . font === font ) {
964
+ return this . _font ;
965
+ }
966
+ if ( font instanceof Font ) {
967
+ this . setFont ( font ) ;
968
+ return this . _font ;
969
+ } else if ( font ) {
970
+ this . _font [ '_uiFont' ] = font ;
971
+ } else {
972
+ this . _font = null ;
973
+ }
974
+ this . _textAttribs = null ;
975
+ return this . _font ;
976
+ }
975
977
getFont ( ) {
976
978
if ( ! this . _font ) {
977
979
this . _font = Font . default ;
You can’t perform that action at this time.
0 commit comments