@@ -131,25 +131,25 @@ class ProxyClass<T> {
131
131
}
132
132
133
133
class Canvas extends ProxyClass < android . graphics . Canvas > {
134
- _bitmap : android . graphics . Bitmap ;
135
- _shouldReleaseBitmap = false ;
134
+ mBitmap : android . graphics . Bitmap ;
135
+ mShouldReleaseBitmap = false ;
136
136
static augmentedMethods = [ 'clear' , 'drawBitmap' , 'drawView' ] ;
137
137
constructor ( imageOrWidth ?: ImageSource | android . graphics . Bitmap | number , height ?: number ) {
138
138
super ( ) ;
139
139
if ( imageOrWidth ) {
140
140
if ( imageOrWidth instanceof ImageSource ) {
141
- this . _bitmap = imageOrWidth . android ;
141
+ this . mBitmap = imageOrWidth . android ;
142
142
} else if ( imageOrWidth instanceof android . graphics . Bitmap ) {
143
- this . _bitmap = imageOrWidth ;
143
+ this . mBitmap = imageOrWidth ;
144
144
} else {
145
- this . _shouldReleaseBitmap = true ;
146
- this . _bitmap = android . graphics . Bitmap . createBitmap ( imageOrWidth , height , android . graphics . Bitmap . Config . ARGB_8888 ) ;
145
+ this . mShouldReleaseBitmap = true ;
146
+ this . mBitmap = android . graphics . Bitmap . createBitmap ( imageOrWidth , height , android . graphics . Bitmap . Config . ARGB_8888 ) ;
147
147
}
148
- if ( ! this . _bitmap . isMutable ( ) ) {
149
- this . _shouldReleaseBitmap = true ;
150
- this . _bitmap = this . _bitmap . copy ( android . graphics . Bitmap . Config . ARGB_8888 , true ) ;
148
+ if ( ! this . mBitmap . isMutable ( ) ) {
149
+ this . mShouldReleaseBitmap = true ;
150
+ this . mBitmap = this . mBitmap . copy ( android . graphics . Bitmap . Config . ARGB_8888 , true ) ;
151
151
}
152
- this . mNative = new android . graphics . Canvas ( this . _bitmap ) ;
152
+ this . mNative = new android . graphics . Canvas ( this . mBitmap ) ;
153
153
}
154
154
155
155
return this ;
@@ -184,12 +184,12 @@ class Canvas extends ProxyClass<android.graphics.Canvas> {
184
184
}
185
185
}
186
186
getImage ( ) {
187
- return this . _bitmap ;
187
+ return this . mBitmap ;
188
188
}
189
189
release ( ) {
190
- if ( this . _shouldReleaseBitmap && this . _bitmap ) {
191
- this . _bitmap . recycle ( ) ;
192
- this . _bitmap = null ;
190
+ if ( this . mShouldReleaseBitmap && this . mBitmap ) {
191
+ this . mBitmap . recycle ( ) ;
192
+ this . mBitmap = null ;
193
193
}
194
194
}
195
195
}
0 commit comments