HatchTile
object HatchTile
The tile of a ShapeStyle.Hatch: a square of spacing pixels that, laid side by side, makes the lines, the cross or the dots run on without a seam (every distance is measured to the nearest line of the repeating pattern, so what leaves one edge comes back in at the opposite one). The lines are anti-aliased over one pixel. Pure Kotlin, like the rest of this package.
Functions
Link copied to clipboard
fun render(pattern: HatchPattern, color: ColorRgba, background: ColorRgba?, spacing: Int, thickness: Float): PixelImage
A square tile of spacing pixels with lines of pattern in color (thickness pixels wide) on background (transparent if null), that repeats without a seam.