Bloc
Bloc copied to clipboard
border and background filling
As of today, we can fill BlElement background with:
- solid color
- radial color
- linear color
- bitmap.
For border, currently we can have:
- solid color
- radial color
- linear color.
The Object for bitmap exist, but cannot be used for border - it needs to implement aeApplyTo:
For consistency reason, I was wondering if we should also complete bitmap support for border. This would allow to draw border like:
BlElement new
geometry: (BlRectangleGeometry new);
background: (Color lightGray);
border: (BlBorder
paint: (BlImagePatternPaint form: PolymorphSystemSettings pharoLogoForm)
width: 30);
size: 358 @ 119
to get this, you need to add
BlImagePatternPaint >> aeApplyTo: aeCanvas
"Apply self as a border to the canvas"
aeCanvas
setSourceWithForm: form
and
AeCanvas >> setSourceWithForm: aForm
cairoContext sourceSurface: (formToCairoSurfaceCache at: aForm) x: 0.0 y: 0.0
However, this doesn't include opacity on border, although opacity on element may be sufficient.