class Pixie::Brush

Overview

The Brush class wraps LibMagick::DrawingWand and provides a simple interface for drawing on an image.

Included Modules

Defined in:

pixie/brush.cr

Constructors

Instance Method Summary

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)) #

[View source]
def self.new(image : Image, draw_info : LibMagick::DrawInfo) #

[View source]
def self.new(wand : Pointer(LibMagick::DrawingWand)) #

[View source]
def self.new #

[View source]
def self.new(image : Image, &block : LibMagick::DrawInfo -> ) #

[View source]

Instance Method Detail

def affine(sx : Float64, sy : Float64, rx : Float64, ry : Float64, tx : Float64, ty : Float64) #

[View source]
def alpha(x : Int32, y : Int32, paint_method : LibMagick::PaintMethod = :point) #

[View source]
def annotation(x : Int32, y : Int32, text : String) #

[View source]
def arc(start_x : Float64, start_y : Float64, end_x : Float64, end_y : Float64, start_angle : Float64, end_angle : Float64) #

[View source]
def bezier(coordinates : Array(Float64)) #

[View source]
def circle(origin_x : Float64, origin_y : Float64, perim_x : Float64, perim_y : Float64) #

[View source]
def clear #

[View source]
def clone #

[View source]
def color(x : Int32, y : Int32, paint_method : LibMagick::PaintMethod = :point) #

[View source]
def comment(comment : String) #

[View source]
def composite(compose : LibMagick::CompositeOperator, x : Int32, y : Int32, width : Int32, height : Int32, image : Image) #

[View source]
def ellipse(origin_x : Float64, origin_y : Float64, radius_x : Float64, radius_y : Float64, start_angle : Float64, end_angle : Float64) #

[View source]
def finalize #

[View source]
def get_border_color #

[View source]
def get_clip_path #

[View source]
def get_clip_rule #

[View source]
def get_clip_units #

[View source]
def get_draw_density #

[View source]
def get_fill_color #

[View source]
def get_fill_opacity #

[View source]
def get_fill_rule #

[View source]
def get_font #

[View source]
def get_font_family #

[View source]
def get_font_resolution #

[View source]
def get_font_size #

[View source]
def get_font_stretch #

[View source]
def get_font_style #

[View source]
def get_font_weight #

[View source]
def get_gravity #

[View source]
def get_stroke_antialias #

[View source]
def get_stroke_color #

[View source]
def get_stroke_dash_array #

[View source]
def get_stroke_dash_offset #

[View source]
def get_stroke_line_cap #

[View source]
def get_stroke_line_join #

[View source]
def get_stroke_miter_limit #

[View source]
def get_stroke_opacity #

[View source]
def get_stroke_width #

[View source]
def get_text_alignment #

[View source]
def get_text_antialias #

[View source]
def get_text_decoration #

[View source]
def get_text_direction #

[View source]
def get_text_encoding #

[View source]
def get_text_interline_spacing #

[View source]
def get_text_interword_spacing #

[View source]
def get_text_kerning #

[View source]
def get_text_under_color #

[View source]
def get_vector_graphics #

[View source]
def info #

[View source]
def line(start_x : Float64, start_y : Float64, end_x : Float64, end_y : Float64) #

[View source]
def path_close #

[View source]
def path_curve_to_absolute(x1 : Float64, y1 : Float64, x2 : Float64, y2 : Float64, x : Float64, y : Float64) #

[View source]
def path_curve_to_quadratic_bezier_absolute(x1 : Float64, y1 : Float64, x : Float64, y : Float64) #

[View source]
def path_curve_to_quadratic_bezier_relative(x1 : Float64, y1 : Float64, x : Float64, y : Float64) #

[View source]
def path_curve_to_quadratic_bezier_smooth_absolute(x : Float64, y : Float64) #

[View source]
def path_curve_to_quadratic_bezier_smooth_relative(x : Float64, y : Float64) #

[View source]
def path_curve_to_relative(x1 : Float64, y1 : Float64, x2 : Float64, y2 : Float64, x : Float64, y : Float64) #

[View source]
def path_curve_to_smooth_absolute(x2 : Float64, y2 : Float64, x : Float64, y : Float64) #

[View source]
def path_curve_to_smooth_relative(x2 : Float64, y2 : Float64, x : Float64, y : Float64) #

[View source]
def path_elliptic_arc_absolute(rx : Float64, ry : Float64, x_axis_rotation : Float64, large_arc_flag : Bool, sweep_flag : Bool, x : Float64, y : Float64) #

[View source]
def path_elliptic_arc_relative(rx : Float64, ry : Float64, x_axis_rotation : Float64, large_arc_flag : Bool, sweep_flag : Bool, x : Float64, y : Float64) #

[View source]
def path_finish #

[View source]
def path_line_to_absolute(x : Float64, y : Float64) #

[View source]
def path_line_to_horizontal_absolute(x : Float64) #

[View source]
def path_line_to_horizontal_relative(x : Float64) #

[View source]
def path_line_to_relative(x : Float64, y : Float64) #

[View source]
def path_line_to_vertical_absolute(y : Float64) #

[View source]
def path_line_to_vertical_relative(y : Float64) #

[View source]
def path_move_to_absolute(x : Float64, y : Float64) #

[View source]
def path_move_to_relative(x : Float64, y : Float64) #

[View source]
def path_start #

[View source]
def point(x : Float64, y : Float64) #

[View source]
def polygon(number_coordinates : Int32, x : Float64, y : Float64) #

[View source]
def polyline(number_coordinates : Int32, x : Float64, y : Float64) #

[View source]
def pop #

[View source]
def pop_clip_path #

[View source]
def pop_defs #

[View source]
def pop_pattern #

[View source]
def push #

[View source]
def push_clip_path(id : String) #

[View source]
def push_defs #

[View source]
def push_pattern(id : String, x : Float64, y : Float64, width : Float64, height : Float64) #

[View source]
def rectangle(x1 : Float64, y1 : Float64, x2 : Float64, y2 : Float64) #

[View source]
def render #

[View source]
def reset_vector_graphics #

[View source]
def rotate(degrees : Float64) #

[View source]
def round_rectangle(x1 : Float64, y1 : Float64, x2 : Float64, y2 : Float64, rx : Float64, ry : Float64) #

[View source]
def scale(x : Float64, y : Float64) #

[View source]
def set_border_color(border_color : Pixel) #

[View source]
def set_clip_path(clip_mask_id : String) #

[View source]
def set_clip_rule(fill_rule : FillRule) #

[View source]
def set_clip_units(units : ClipPathUnits) #

[View source]
def set_density(density : String) #

[View source]
def set_fill_color(fill_color : Pixel) #

[View source]
def set_fill_opacity(fill_opacity : Float64) #

[View source]
def set_fill_pattern_url(fill_url : String) #

[View source]
def set_fill_rule(fill_rule : FillRule) #

[View source]
def set_font(font : String) #

[View source]
def set_font_family(font_family : String) #

[View source]
def set_font_resolution(x : Float64, y : Float64) #

[View source]
def set_font_size(pointsize : Float64) #

[View source]
def set_font_stretch(font_stretch : StretchType) #

[View source]
def set_font_style(font_style : StyleType) #

[View source]
def set_font_weight(font_weight : Int32) #

[View source]
def set_gravity(gravity : GravityType) #

[View source]
def set_opacity(opacity : Float64) #

[View source]
def set_stroke_antialias(antialias : Bool) #

[View source]
def set_stroke_color(stroke_color : Pixel) #

[View source]
def set_stroke_dash_array(dash_array : Float64) #

[View source]
def set_stroke_dash_offset(dash_offset : Float64) #

[View source]
def set_stroke_line_cap(line_cap : LineCap) #

[View source]
def set_stroke_line_join(line_join : LineJoin) #

[View source]
def set_stroke_miter_limit(miterlimit : Int32) #

[View source]
def set_stroke_opacity(stroke_opacity : Float64) #

[View source]
def set_stroke_width(stroke_width : Float64) #

[View source]
def set_text_alignment(alignment : AlignType) #

[View source]
def set_text_antialias(antialias : Bool) #

[View source]
def set_text_decoration(decoration : DecorationType) #

[View source]
def set_text_direction(direction : DirectionType) #

[View source]
def set_text_encoding(encoding : String) #

[View source]
def set_text_interline_spacing(spacing : Float64) #

[View source]
def set_text_interword_spacing(spacing : Float64) #

[View source]
def set_text_kerning(kerning : Float64) #

[View source]
def set_text_under_color(under_color : Pixel) #

[View source]
def set_vector_graphics(vector_graphics : String) #

[View source]
def set_viewbox(x1 : Int32, y1 : Int32, x2 : Int32, y2 : Int32) #

[View source]
def skew_x(degrees : Float64) #

[View source]
def skew_y(degrees : Float64) #

[View source]
def to_unsafe : Pointer(LibMagick::DrawingWand) #

[View source]
def translate(x : Float64, y : Float64) #

[View source]