Commit Graph

6 Commits

Author SHA1 Message Date
Constantin Piber
1a5cfd8f58 Implement setPixel & setPixels (#1971)
* Implement `setPixel` & `setPixels`

Closes #1970

* Update changelog
2026-05-05 10:03:56 -04:00
Constantin Piber
c4d8bba5ca Bitmap: Allow pixel-based access (#1855) 2026-01-11 16:48:07 -05:00
Constantin Piber
b979db9acb BitmapFactory: Support basic options (#1853)
* BitmapFactory: Support basic options

* Bitmap: Support querying image type

* Bitmap: Support all BufferedImage image types

Required to be able to construct a bitmap with exactly the same
parameters
2026-01-11 16:47:52 -05:00
Constantin Piber
20c850c10b Implement Bitmap.copy, text layouting (#1455)
* Bitmap: Use provided config

* Bitmap: implement copy

* Bitmap: Simplify getPixels

This also fixes a bug where the returned data may not be in the correct
format

Android getPixels():
> The returned colors are non-premultiplied ARGB values in the sRGB color space.
BufferedImage getRGB():
> Returns an array of integer pixels in the default RGB color model (TYPE_INT_ARGB) and default sRGB color space

* Stub TextPaint and Paint

* Paint: Implement some required functions

* Stub StaticLayout and Layout

* Implement some Paint support

* Draw Bounds

* WebP write support

* First text rendering

* Paint: Fix text size, font metrics

* Paint: Fix not copying new properties

Fixes font size in draw

* Canvas: Stroke add cap/join for better aliasing

Otherwise we get bad artifacts on sharp corners

Based on https://stackoverflow.com/a/35222059/

* Remove logs

* Canvas: Implement other drawText methods

* Bitmap: support erase

* Layout: Fix text direction

Should be LTR, otherwise 0 is read, which is automatically interpreted
as RTL without explicit check

* Bitmap: scale to destination rectangle

* Canvas: drawBitmap with just x/y

* Bitmap: Convert image on JPEG export to RGB

JPEG does not support alpha, so will throw "bogus color space"

* Switch to newer fork
2025-06-21 12:01:56 -04:00
He Zhu
3b36974d84 Fixed Bitmap missing method when using Baozi Manhua extensions. (#687) 2023-09-23 16:26:20 -04:00
Zero
0a748cd53b implementation of android.graphics.BitmapFactory (#460)
Only what was needed is implemented, compression method is still untested.
2022-12-05 19:21:16 +03:30