class

UIng::Area::Draw::Path

Inherits UIng::BlockConstructor < Reference < Object

Constructors

new(*args, &)
Source
new(*args, **kwargs, &)
Source
new(mode : FillMode)
Source

Class methods

open(mode : FillMode, &)

Creates a new Path and yields it to the block.

  • The block must explicitly call end_path before using this path in Context APIs.
  • The path is always freed after the block, even if an exception occurs.
  • Returns the block's return value (NOT the Path instance).
Source

Instance methods

add_rectangle(x : Number, y : Number, width : Number, height : Number) : self
Source
add_rounded_rectangle(x : Number, y : Number, width : Number, height : Number, radius : Number) : self

Adds a rectangle with corners rounded by radius. The native API limits large radii to half the shorter side.

Source
arc_to(x_center : Number, y_center : Number, radius : Number, start_angle : Number, sweep : Number, negative : Bool) : self
Source
bezier_to(c1x : Number, c1y : Number, c2x : Number, c2y : Number, end_x : Number, end_y : Number) : self
Source
close_figure
Source
end_path
Source
ended?
Source
free
Source
line_to(x : Number, y : Number) : self
Source
new_figure(x : Number, y : Number) : self
Source
new_figure_with_arc(x_center : Number, y_center : Number, radius : Number, start_angle : Number, sweep : Number, negative : Bool) : self
Source
released?
Source
to_unsafe
Source