Skip to content

Commit

Permalink
Updated ImageSource.fromLineStipple to generate RGBA bitmaps (issue #63)
Browse files Browse the repository at this point in the history
  • Loading branch information
pdavidc committed Sep 30, 2016
1 parent 32da5ef commit 8c5071a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public static ImageSource fromLineStipple(int factor, short pattern) {
int[] pixels = new int[width];
Arrays.fill(pixels, white);

Bitmap bitmap = Bitmap.createBitmap(width, 1 /*height*/, Bitmap.Config.ALPHA_8);
Bitmap bitmap = Bitmap.createBitmap(width, 1 /*height*/, Bitmap.Config.ARGB_4444);
bitmap.setPixels(pixels, 0 /*offset*/, width /*stride*/, 0 /*x*/, 0 /*y*/, width, 1 /*height*/);

return ImageSource.fromBitmap(bitmap);
Expand All @@ -213,7 +213,7 @@ public static ImageSource fromLineStipple(int factor, short pattern) {
}
}

Bitmap bitmap = Bitmap.createBitmap(width, 1 /*height*/, Bitmap.Config.ALPHA_8);
Bitmap bitmap = Bitmap.createBitmap(width, 1 /*height*/, Bitmap.Config.ARGB_4444);
bitmap.setPixels(pixels, 0 /*offset*/, width /*stride*/, 0 /*x*/, 0 /*y*/, width, 1 /*height*/);

return ImageSource.fromBitmap(bitmap);
Expand Down

0 comments on commit 8c5071a

Please sign in to comment.