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 {
328328 set textSize ( value : number ) {
329329 this . _native . setTextSize ( value ) ;
330330 }
331+ get textSize ( ) {
332+ return this . getTextSize ( ) ;
333+ }
334+ public getTextSize ( ) : number {
335+ return this . _native . getTextSize ( ) ;
336+ }
331337 public setTypeface ( font : Font | android . graphics . Typeface ) : Font {
332338 if ( font instanceof Font ) {
333- this . fontInternal = font ;
339+ this . setFont ( font ) ;
340+ return this . fontInternal ; ;
334341 } else if ( font ) {
335342 this . fontInternal [ '_typeface' ] = font ;
336343 } else {
Original file line number Diff line number Diff line change @@ -829,20 +829,7 @@ export class Paint implements IPaint {
829829 // path._path = bPath.CGPath;
830830 }
831831 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+
846833 public setTextAlign ( align : Align ) : void {
847834 this . align = align ;
848835 this . _textAttribs = null ;
@@ -972,6 +959,21 @@ export class Paint implements IPaint {
972959 this . _font = font ;
973960 this . _textAttribs = null ;
974961 }
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+ }
975977 getFont ( ) {
976978 if ( ! this . _font ) {
977979 this . _font = Font . default ;
You can’t perform that action at this time.
0 commit comments