Class Imlib2::Context |
|
Methods |
Public Class methods |
new(VALUE klass) |
pop(klass) |
Pop the top context off the context stack.
Example:
ctx = Imlib2::Context.pop
get(klass) |
Return the current context.
Example:
ctx = Imlib2::Context.get
current(klass) |
Return the current context.
Example:
ctx = Imlib2::Context.get
Public Instance methods |
initialize(VALUE self) |
Imlib2::Context constructor.
Currently just a placeholder
push(VALUE self) |
Push this context onto the context stack.
Example:
ctx.push
set_dither_mask(VALUE self, VALUE val) |
dither_mask=(VALUE self, VALUE val) |
get_dither_mask(VALUE self) |
dither_mask(VALUE self) |
set_anti_alias(VALUE self, VALUE val) |
anti_alias=(VALUE self, VALUE val) |
aa=(VALUE self, VALUE val) |
get_anti_alias(VALUE self) |
anti_alias(VALUE self) |
aa(VALUE self) |
set_blend(VALUE self, VALUE val) |
Set the blend flag.
Example:
ctx.blend = true
blend=(VALUE self, VALUE val) |
Set the blend flag.
Example:
ctx.blend = true
get_blend(VALUE self) |
Get the blend flag.
Example:
if ctx.blend puts 'blend enabled.' end
blend(VALUE self) |
Get the blend flag.
Example:
if ctx.blend puts 'blend enabled.' end
set_color_modifier(VALUE self, VALUE val) |
color_modifier=(VALUE self, VALUE val) |
cmod=(VALUE self, VALUE val) |
get_color_modifier(VALUE self) |
color_modifier(VALUE self) |
cmod(VALUE self) |
set_operation(VALUE self, VALUE val) |
Set the current operation (Imlib2::Op or Imlib2::Operation).
Example:
ctx.operation = Imlib2::Op::COPY
operation=(VALUE self, VALUE val) |
Set the current operation (Imlib2::Op or Imlib2::Operation).
Example:
ctx.operation = Imlib2::Op::COPY
op=(VALUE self, VALUE val) |
Set the current operation (Imlib2::Op or Imlib2::Operation).
Example:
ctx.operation = Imlib2::Op::COPY
get_operation(VALUE self) |
Get the current operation (Imlib2::Op or Imlib2::Operation).
Example:
if ctx.op == Imlib2::Op::COPY puts 'copy operation' end
operation(VALUE self) |
Get the current operation (Imlib2::Op or Imlib2::Operation).
Example:
if ctx.op == Imlib2::Op::COPY puts 'copy operation' end
op(VALUE self) |
Get the current operation (Imlib2::Op or Imlib2::Operation).
Example:
if ctx.op == Imlib2::Op::COPY puts 'copy operation' end
set_font(VALUE self, VALUE val) |
font=(VALUE self, VALUE val) |
get_font(VALUE self) |
font(VALUE self) |
set_direction(VALUE self, VALUE val) |
Set the current font direction (Imlib2::Dir or Imlib2::Direction).
Example:
ctx.direction = Imlib2::Direction::LEFT
direction=(VALUE self, VALUE val) |
Set the current font direction (Imlib2::Dir or Imlib2::Direction).
Example:
ctx.direction = Imlib2::Direction::LEFT
dir=(VALUE self, VALUE val) |
Set the current font direction (Imlib2::Dir or Imlib2::Direction).
Example:
ctx.direction = Imlib2::Direction::LEFT
get_direction(VALUE self) |
Get the current font direction (Imlib2::Dir or Imlib2::Direction).
Example:
if ctx.direction != Imlib2::Direction::RIGHT puts 'drawing funny text' end
direction(VALUE self) |
Get the current font direction (Imlib2::Dir or Imlib2::Direction).
Example:
if ctx.direction != Imlib2::Direction::RIGHT puts 'drawing funny text' end
dir(VALUE self) |
Get the current font direction (Imlib2::Dir or Imlib2::Direction).
Example:
if ctx.direction != Imlib2::Direction::RIGHT puts 'drawing funny text' end
set_angle(VALUE self, VALUE val) |
Set the text drawing angle.
Example:
ctx.angle = 76.8
angle=(VALUE self, VALUE val) |
Set the text drawing angle.
Example:
ctx.angle = 76.8
get_angle(VALUE self) |
Get the text drawing angle.
Example:
if ctx.dir == Imlib2::Direction::ANGLE puts 'the current font angle is ' << ctx.angle end
angle(VALUE self) |
Get the text drawing angle.
Example:
if ctx.dir == Imlib2::Direction::ANGLE puts 'the current font angle is ' << ctx.angle end
set_color(VALUE self, VALUE val) |
color=(VALUE self, VALUE val) |
get_color(VALUE self) |
color(VALUE self) |
set_gradient(VALUE self, VALUE val) |
gradient=(VALUE self, VALUE val) |
get_gradient(VALUE self) |
gradient(VALUE self) |
set_progress_granularity(VALUE self, VALUE val) |
Set the progress callback granularity.
This function is not useful at the moment since you cannot specify progress callbacks from within ruby (this is a TODO item).
Example:
ctx.progress_granularity = 10
progress_granularity=(VALUE self, VALUE val) |
Set the progress callback granularity.
This function is not useful at the moment since you cannot specify progress callbacks from within ruby (this is a TODO item).
Example:
ctx.progress_granularity = 10
get_progress_granularity(VALUE self) |
Get the progress callback granularity.
This function is not useful at the moment since you cannot specify progress callbacks from within Ruby (this is a TODO item).
Example:
granularity = ctx.progress_granularity
progress_granularity(VALUE self) |
Get the progress callback granularity.
This function is not useful at the moment since you cannot specify progress callbacks from within Ruby (this is a TODO item).
Example:
granularity = ctx.progress_granularity
set_image(VALUE self, VALUE val) |
Set the current image (Imlib2::Image).
Note that this function is not useful at the moment since all image instance methods blindly blow away the image and color context. So you cannot safely mix image context and image instance methods.
Example:
ctx.image = image
image=(VALUE self, VALUE val) |
Set the current image (Imlib2::Image).
Note that this function is not useful at the moment since all image instance methods blindly blow away the image and color context. So you cannot safely mix image context and image instance methods.
Example:
ctx.image = image
get_image(VALUE self) |
Get the current image (Imlib2::Image).
Note that this function is not useful at the moment since all image instance methods blindly blow away the image and color context. So you cannot safely mix image context and image instance methods.
Example:
im = ctx.image
image(VALUE self) |
Get the current image (Imlib2::Image).
Note that this function is not useful at the moment since all image instance methods blindly blow away the image and color context. So you cannot safely mix image context and image instance methods.
Example:
im = ctx.image
set_cliprect(VALUE self, VALUE val) |
Set the cliprect.
Example:
ctx.cliprect = [10, 10, 100, 100]
cliprect=(VALUE self, VALUE val) |
Set the cliprect.
Example:
ctx.cliprect = [10, 10, 100, 100]
get_cliprect(VALUE self) |
Get the cliprect.
Example:
x, y, w, h = ctx.cliprect
cliprect(VALUE self) |
Get the cliprect.
Example:
x, y, w, h = ctx.cliprect
set_ttf_encoding(VALUE self, VALUE val) |
set_encoding(VALUE self, VALUE val) |
encoding=(VALUE self, VALUE val) |
get_encoding(VALUE self) |
Get the current TrueType Font Encoding.
Example:
if ctx.encoding == Imlib2::Encoding::ISO_8859_1 puts 'using ISO-8859-1 encoding' end
get_ttf_encoding(VALUE self) |
Get the current TrueType Font Encoding.
Example:
if ctx.encoding == Imlib2::Encoding::ISO_8859_1 puts 'using ISO-8859-1 encoding' end
encoding(VALUE self) |