For simple skinning of controls with images we would like to be able to use a Image as a fill with 9 part scaling to fill the area of the painted shape. There are a number of different ways the shape can be filled with the image:
* Center - simply center the image at 1:1, clipping within the shape
* Stretch - scale the image to fit shape, there are some sub options here
* Simple scale to match shape width and height
* Maintain aspect ratio (Could leave unfilled areas)
* Maintain aspect ratio + clip, (means more cropping but completely filled)
* Tile - start image at give position in image and repeat in x, y or both directions with optional mirroring
* Paint 9 Stretch - The is where the image is split into 9 pieces 3 across and 3 down and the corners
are fixed size and the middle and sides stretch
* Paint 9 Tile - The is where the image is split into 9 pieces 3 across and 3 down and the corners
are fixed size and the middle and sides Tile
Attached is a prototype for the Java2D Painter implementation that does some of these styles.
* Center - simply center the image at 1:1, clipping within the shape
* Stretch - scale the image to fit shape, there are some sub options here
* Simple scale to match shape width and height
* Maintain aspect ratio (Could leave unfilled areas)
* Maintain aspect ratio + clip, (means more cropping but completely filled)
* Tile - start image at give position in image and repeat in x, y or both directions with optional mirroring
* Paint 9 Stretch - The is where the image is split into 9 pieces 3 across and 3 down and the corners
are fixed size and the middle and sides stretch
* Paint 9 Tile - The is where the image is split into 9 pieces 3 across and 3 down and the corners
are fixed size and the middle and sides Tile
Attached is a prototype for the Java2D Painter implementation that does some of these styles.
- blocks
-
JDK-8099438 Add ImagePattern to the Public API as part of the common profile
-
- Closed
-
- relates to
-
JDK-8099304 ImagePattern
-
- Resolved
-