drawPushPattern method

bool drawPushPattern({
  1. required String patternId,
  2. required double x,
  3. required double y,
  4. required double width,
  5. required double height,
})

DrawPushPattern() indicates that subsequent commands up to a DrawPopPattern() command comprise the definition of a named pattern. The pattern space is assigned top left corner coordinates, a width and height, and becomes its own drawing space. Anything which can be drawn may be used in a pattern definition. Named patterns may be used as stroke or brush definitions.

  • patternId : pattern identification for later reference
  • x : x ordinate of top left corner
  • y : y ordinate of top left corner
  • width : width of pattern space
  • height : height of pattern space

Implementation

bool drawPushPattern({
  required String patternId,
  required double x,
  required double y,
  required double width,
  required double height,
}) =>
    using(
      (Arena arena) => _magickWandBindings.DrawPushPattern(
        _wandPtr,
        patternId.toNativeUtf8(allocator: arena).cast(),
        x,
        y,
        width,
        height,
      ),
    ).toBool();