@@ -129,7 +129,7 @@ bool Bitmap::GetTransparent() const {
129
129
}
130
130
131
131
Color Bitmap::GetTransparentColor () const {
132
- return GetColor ( colorkey () );
132
+ return Color ( );
133
133
}
134
134
135
135
void Bitmap::SetTransparentColor (Color /* color */ ) {
@@ -269,14 +269,11 @@ void Bitmap::HSLBlit(int x, int y, Bitmap const& src, Rect const& src_rect_, dou
269
269
270
270
BitmapUtils* Bitmap::Begin () {
271
271
BitmapUtils* bm_utils = BitmapUtils::Create (format, format, false );
272
- bm_utils->SetDstColorKey (colorkey ());
273
272
return bm_utils;
274
273
}
275
274
276
275
BitmapUtils* Bitmap::Begin (Bitmap const & src) const {
277
276
BitmapUtils* bm_utils = BitmapUtils::Create (format, src.format , true );
278
- bm_utils->SetDstColorKey (colorkey ());
279
- bm_utils->SetSrcColorKey (src.colorkey ());
280
277
return bm_utils;
281
278
}
282
279
@@ -694,10 +691,6 @@ uint32_t Bitmap::amask() const {
694
691
return pixel_format.a .mask ;
695
692
}
696
693
697
- uint32_t Bitmap::colorkey () const {
698
- return 0 ;
699
- }
700
-
701
694
BitmapRef Bitmap::Resample (int scale_w, int scale_h, const Rect & src_rect) const {
702
695
BitmapRef dst (new Bitmap (scale_w, scale_h, GetTransparent ()));
703
696
@@ -713,7 +706,7 @@ BitmapRef Bitmap::Resample(int scale_w, int scale_h, const Rect& src_rect) const
713
706
714
707
pixman_image_composite32 (PIXMAN_OP_SRC,
715
708
bitmap, (pixman_image_t *) NULL , dst->bitmap ,
716
- src_rect.x / zoom_x , src_rect.y / zoom_y ,
709
+ src_rect.x * scale_w / src_rect. width , src_rect.y *scale_h / src_rect. height ,
717
710
0 , 0 ,
718
711
0 , 0 ,
719
712
scale_w, scale_h);
@@ -833,7 +826,7 @@ void Bitmap::StretchBlit(Rect const& dst_rect, Bitmap const& src, Rect const& sr
833
826
834
827
pixman_image_composite32 (PIXMAN_OP_OVER,
835
828
src.bitmap , mask, bitmap,
836
- src_rect.x / zoom_x , src_rect.y / zoom_y ,
829
+ src_rect.x * dst_rect. width / src_rect. width , src_rect.y * dst_rect. height / src_rect. height ,
837
830
0 , 0 ,
838
831
dst_rect.x , dst_rect.y ,
839
832
dst_rect.width , dst_rect.height );
0 commit comments