class Pixie::Brush
- Pixie::Brush
- Reference
- Object
Overview
The Brush
class wraps LibMagick::DrawingWand
and provides a simple
interface for drawing on an image.
Included Modules
Defined in:
pixie/brush.crConstructors
- .new(image : Pointer(LibMagick::Image), draw_info : Pointer(LibMagick::DrawInfo))
- .new(image : Image, draw_info : LibMagick::DrawInfo)
- .new(wand : Pointer(LibMagick::DrawingWand))
- .new
- .new(image : Image, &block : LibMagick::DrawInfo -> )
Instance Method Summary
- #affine(sx : Float64, sy : Float64, rx : Float64, ry : Float64, tx : Float64, ty : Float64)
- #alpha(x : Int32, y : Int32, paint_method : LibMagick::PaintMethod = :point)
- #annotation(x : Int32, y : Int32, text : String)
- #arc(start_x : Float64, start_y : Float64, end_x : Float64, end_y : Float64, start_angle : Float64, end_angle : Float64)
- #bezier(coordinates : Array(Float64))
- #circle(origin_x : Float64, origin_y : Float64, perim_x : Float64, perim_y : Float64)
- #clear
- #clone
- #color(x : Int32, y : Int32, paint_method : LibMagick::PaintMethod = :point)
- #comment(comment : String)
- #composite(compose : LibMagick::CompositeOperator, x : Int32, y : Int32, width : Int32, height : Int32, image : Image)
- #ellipse(origin_x : Float64, origin_y : Float64, radius_x : Float64, radius_y : Float64, start_angle : Float64, end_angle : Float64)
- #finalize
- #get_border_color
- #get_clip_path
- #get_clip_rule
- #get_clip_units
- #get_draw_density
- #get_fill_color
- #get_fill_opacity
- #get_fill_rule
- #get_font
- #get_font_family
- #get_font_resolution
- #get_font_size
- #get_font_stretch
- #get_font_style
- #get_font_weight
- #get_gravity
- #get_stroke_antialias
- #get_stroke_color
- #get_stroke_dash_array
- #get_stroke_dash_offset
- #get_stroke_line_cap
- #get_stroke_line_join
- #get_stroke_miter_limit
- #get_stroke_opacity
- #get_stroke_width
- #get_text_alignment
- #get_text_antialias
- #get_text_decoration
- #get_text_direction
- #get_text_encoding
- #get_text_interline_spacing
- #get_text_interword_spacing
- #get_text_kerning
- #get_text_under_color
- #get_vector_graphics
- #info
- #line(start_x : Float64, start_y : Float64, end_x : Float64, end_y : Float64)
- #path_close
- #path_curve_to_absolute(x1 : Float64, y1 : Float64, x2 : Float64, y2 : Float64, x : Float64, y : Float64)
- #path_curve_to_quadratic_bezier_absolute(x1 : Float64, y1 : Float64, x : Float64, y : Float64)
- #path_curve_to_quadratic_bezier_relative(x1 : Float64, y1 : Float64, x : Float64, y : Float64)
- #path_curve_to_quadratic_bezier_smooth_absolute(x : Float64, y : Float64)
- #path_curve_to_quadratic_bezier_smooth_relative(x : Float64, y : Float64)
- #path_curve_to_relative(x1 : Float64, y1 : Float64, x2 : Float64, y2 : Float64, x : Float64, y : Float64)
- #path_curve_to_smooth_absolute(x2 : Float64, y2 : Float64, x : Float64, y : Float64)
- #path_curve_to_smooth_relative(x2 : Float64, y2 : Float64, x : Float64, y : Float64)
- #path_elliptic_arc_absolute(rx : Float64, ry : Float64, x_axis_rotation : Float64, large_arc_flag : Bool, sweep_flag : Bool, x : Float64, y : Float64)
- #path_elliptic_arc_relative(rx : Float64, ry : Float64, x_axis_rotation : Float64, large_arc_flag : Bool, sweep_flag : Bool, x : Float64, y : Float64)
- #path_finish
- #path_line_to_absolute(x : Float64, y : Float64)
- #path_line_to_horizontal_absolute(x : Float64)
- #path_line_to_horizontal_relative(x : Float64)
- #path_line_to_relative(x : Float64, y : Float64)
- #path_line_to_vertical_absolute(y : Float64)
- #path_line_to_vertical_relative(y : Float64)
- #path_move_to_absolute(x : Float64, y : Float64)
- #path_move_to_relative(x : Float64, y : Float64)
- #path_start
- #point(x : Float64, y : Float64)
- #polygon(number_coordinates : Int32, x : Float64, y : Float64)
- #polyline(number_coordinates : Int32, x : Float64, y : Float64)
- #pop
- #pop_clip_path
- #pop_defs
- #pop_pattern
- #push
- #push_clip_path(id : String)
- #push_defs
- #push_pattern(id : String, x : Float64, y : Float64, width : Float64, height : Float64)
- #rectangle(x1 : Float64, y1 : Float64, x2 : Float64, y2 : Float64)
- #render
- #reset_vector_graphics
- #rotate(degrees : Float64)
- #round_rectangle(x1 : Float64, y1 : Float64, x2 : Float64, y2 : Float64, rx : Float64, ry : Float64)
- #scale(x : Float64, y : Float64)
- #set_border_color(border_color : Pixel)
- #set_clip_path(clip_mask_id : String)
- #set_clip_rule(fill_rule : FillRule)
- #set_clip_units(units : ClipPathUnits)
- #set_density(density : String)
- #set_fill_color(fill_color : Pixel)
- #set_fill_opacity(fill_opacity : Float64)
- #set_fill_pattern_url(fill_url : String)
- #set_fill_rule(fill_rule : FillRule)
- #set_font(font : String)
- #set_font_family(font_family : String)
- #set_font_resolution(x : Float64, y : Float64)
- #set_font_size(pointsize : Float64)
- #set_font_stretch(font_stretch : StretchType)
- #set_font_style(font_style : StyleType)
- #set_font_weight(font_weight : Int32)
- #set_gravity(gravity : GravityType)
- #set_opacity(opacity : Float64)
- #set_stroke_antialias(antialias : Bool)
- #set_stroke_color(stroke_color : Pixel)
- #set_stroke_dash_array(dash_array : Float64)
- #set_stroke_dash_offset(dash_offset : Float64)
- #set_stroke_line_cap(line_cap : LineCap)
- #set_stroke_line_join(line_join : LineJoin)
- #set_stroke_miter_limit(miterlimit : Int32)
- #set_stroke_opacity(stroke_opacity : Float64)
- #set_stroke_width(stroke_width : Float64)
- #set_text_alignment(alignment : AlignType)
- #set_text_antialias(antialias : Bool)
- #set_text_decoration(decoration : DecorationType)
- #set_text_direction(direction : DirectionType)
- #set_text_encoding(encoding : String)
- #set_text_interline_spacing(spacing : Float64)
- #set_text_interword_spacing(spacing : Float64)
- #set_text_kerning(kerning : Float64)
- #set_text_under_color(under_color : Pixel)
- #set_vector_graphics(vector_graphics : String)
- #set_viewbox(x1 : Int32, y1 : Int32, x2 : Int32, y2 : Int32)
- #skew_x(degrees : Float64)
- #skew_y(degrees : Float64)
- #to_unsafe : Pointer(LibMagick::DrawingWand)
- #translate(x : Float64, y : Float64)
Class methods inherited from module Pixie::Helpers
assert_no_exception(exception_info : LibMagick::ExceptionInfo)
assert_no_exception
Constructor Detail
def self.new(image : Pointer(LibMagick::Image), draw_info : Pointer(LibMagick::DrawInfo))
#
Instance Method Detail
def affine(sx : Float64, sy : Float64, rx : Float64, ry : Float64, tx : Float64, ty : Float64)
#
def arc(start_x : Float64, start_y : Float64, end_x : Float64, end_y : Float64, start_angle : Float64, end_angle : Float64)
#
def circle(origin_x : Float64, origin_y : Float64, perim_x : Float64, perim_y : Float64)
#
def composite(compose : LibMagick::CompositeOperator, x : Int32, y : Int32, width : Int32, height : Int32, image : Image)
#
def ellipse(origin_x : Float64, origin_y : Float64, radius_x : Float64, radius_y : Float64, start_angle : Float64, end_angle : Float64)
#
def path_curve_to_absolute(x1 : Float64, y1 : Float64, x2 : Float64, y2 : Float64, x : Float64, y : Float64)
#
def path_curve_to_quadratic_bezier_absolute(x1 : Float64, y1 : Float64, x : Float64, y : Float64)
#
def path_curve_to_quadratic_bezier_relative(x1 : Float64, y1 : Float64, x : Float64, y : Float64)
#
def path_curve_to_relative(x1 : Float64, y1 : Float64, x2 : Float64, y2 : Float64, x : Float64, y : Float64)
#
def path_curve_to_smooth_absolute(x2 : Float64, y2 : Float64, x : Float64, y : Float64)
#
def path_curve_to_smooth_relative(x2 : Float64, y2 : Float64, x : Float64, y : Float64)
#
def path_elliptic_arc_absolute(rx : Float64, ry : Float64, x_axis_rotation : Float64, large_arc_flag : Bool, sweep_flag : Bool, x : Float64, y : Float64)
#
def path_elliptic_arc_relative(rx : Float64, ry : Float64, x_axis_rotation : Float64, large_arc_flag : Bool, sweep_flag : Bool, x : Float64, y : Float64)
#
def push_pattern(id : String, x : Float64, y : Float64, width : Float64, height : Float64)
#
def round_rectangle(x1 : Float64, y1 : Float64, x2 : Float64, y2 : Float64, rx : Float64, ry : Float64)
#