Class Imlib2::Context
In: imlib2.c
Parent: Object
Methods
aa    aa=    angle    angle=    anti_alias    anti_alias=    blend    blend=    cliprect    cliprect=    cmod    cmod=    color    color=    color_modifier    color_modifier=    current    dir    dir=    direction    direction=    dither_mask    dither_mask=    encoding    encoding=    font    font=    get    get_angle    get_anti_alias    get_blend    get_cliprect    get_color    get_color_modifier    get_direction    get_dither_mask    get_encoding    get_font    get_gradient    get_image    get_operation    get_progress_granularity    get_ttf_encoding    gradient    gradient=    image    image=    initialize    new    op    op=    operation    operation=    pop    progress_granularity    progress_granularity=    push    set_angle    set_anti_alias    set_blend    set_cliprect    set_color    set_color_modifier    set_direction    set_dither_mask    set_encoding    set_font    set_gradient    set_image    set_operation    set_progress_granularity    set_ttf_encoding   
Public Class methods
new(VALUE klass)

Return a new Imlib2::Context.

Example:

  ctx = Imlib2::Context.new
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)

Set the dither_mask flag.

Example:

  ctx.dither_mask = true
dither_mask=(VALUE self, VALUE val)

Set the dither_mask flag.

Example:

  ctx.dither_mask = true
get_dither_mask(VALUE self)

Get the dither_mask flag.

Example:

  if ctx.dither_mask == true
    puts 'dither_mask enabled'
  end
dither_mask(VALUE self)

Get the dither_mask flag.

Example:

  if ctx.dither_mask == true
    puts 'dither_mask enabled'
  end
set_anti_alias(VALUE self, VALUE val)

Set the anti_alias flag.

Example:

  ctx.anti_alias = true
anti_alias=(VALUE self, VALUE val)

Set the anti_alias flag.

Example:

  ctx.anti_alias = true
aa=(VALUE self, VALUE val)

Set the anti_alias flag.

Example:

  ctx.anti_alias = true
get_anti_alias(VALUE self)

Get the anti_alias flag.

Example:

  if ctx.anti_alias == true
    puts 'anti_alias enabled.'
  end
anti_alias(VALUE self)

Get the anti_alias flag.

Example:

  if ctx.anti_alias == true
    puts 'anti_alias enabled.'
  end
aa(VALUE self)

Get the anti_alias flag.

Example:

  if ctx.anti_alias == true
    puts 'anti_alias enabled.'
  end
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)

Set the current color modifier (Imlib2::ColorModifier).

Example:

  ctx.cmod = cmod
color_modifier=(VALUE self, VALUE val)

Set the current color modifier (Imlib2::ColorModifier).

Example:

  ctx.cmod = cmod
cmod=(VALUE self, VALUE val)

Set the current color modifier (Imlib2::ColorModifier).

Example:

  ctx.cmod = cmod
get_color_modifier(VALUE self)

Get the current color modifier (Imlib2::ColorModifier).

Example:

  cmod = ctx.cmod
color_modifier(VALUE self)

Get the current color modifier (Imlib2::ColorModifier).

Example:

  cmod = ctx.cmod
cmod(VALUE self)

Get the current color modifier (Imlib2::ColorModifier).

Example:

  cmod = ctx.cmod
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)

Set the current font (Imlib2::Font).

Example:

  ctx.font = Imlib2::Font.new 'helvetica/12'
font=(VALUE self, VALUE val)

Set the current font (Imlib2::Font).

Example:

  ctx.font = Imlib2::Font.new 'helvetica/12'
get_font(VALUE self)

Get the current font (Imlib2::Font).

Example:

  font = ctx.font
font(VALUE self)

Get the current font (Imlib2::Font).

Example:

  font = ctx.font
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)

Set the current color (Imlib2::Color).

Example:

  ctx.color = Imlib2::Color::LIGHTGRAY
color=(VALUE self, VALUE val)

Set the current color (Imlib2::Color).

Example:

  ctx.color = Imlib2::Color::LIGHTGRAY
get_color(VALUE self)

Get the current color (Imlib2::Color::RgbaColor).

Example:

  color = ctx.color
color(VALUE self)

Get the current color (Imlib2::Color::RgbaColor).

Example:

  color = ctx.color
set_gradient(VALUE self, VALUE val)

Set the current gradient (Imlib2::Gradient).

Example:

  ctx.gradient = grad
gradient=(VALUE self, VALUE val)

Set the current gradient (Imlib2::Gradient).

Example:

  ctx.gradient = grad
get_gradient(VALUE self)

Get the current gradient (Imlib2::Gradient).

Example:

  grad = ctx.gradient
gradient(VALUE self)

Get the current gradient (Imlib2::Gradient).

Example:

  grad = ctx.gradient
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 the current TrueType Font Encoding.

Example:

  ctx.encoding = Imlib2::Encoding::ISO_8859_5
set_encoding(VALUE self, VALUE val)

Set the current TrueType Font Encoding.

Example:

  ctx.encoding = Imlib2::Encoding::ISO_8859_5
encoding=(VALUE self, VALUE val)

Set the current TrueType Font Encoding.

Example:

  ctx.encoding = Imlib2::Encoding::ISO_8859_5
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)

Get the current TrueType Font Encoding.

Example:

  if ctx.encoding == Imlib2::Encoding::ISO_8859_1
    puts 'using ISO-8859-1 encoding'
  end