Google

"DTD/xhtml1-strict.dtd">
Class Imlib2::Context
In: ./imlib2.c
Methods
aa    aa=    angle    angle=    anti_alias    anti_alias=    best_visual    blend    blend=    cliprect    cliprect=    cmap    cmap=    cmod    cmod=    color    color=    color_modifier    color_modifier=    colormap    colormap=    current    dir    dir=    direction    direction=    display    display=    dither    dither=    dither_mask    dither_mask=    drawable    drawable=    encoding    encoding=    font    font=    get    get_angle    get_anti_alias    get_best_visual    get_blend    get_cliprect    get_cmap    get_color    get_color_modifier    get_colormap    get_direction    get_display    get_dither    get_dither_mask    get_drawable    get_encoding    get_font    get_gradient    get_image    get_mask    get_operation    get_progress_granularity    get_ttf_encoding    get_visual    get_visual    gradient    gradient=    image    image=    initialize    mask    mask=    new    op    op=    operation    operation=    pop    progress_granularity    progress_granularity=    push    set_angle    set_anti_alias    set_blend    set_cliprect    set_cmap    set_color    set_color_modifier    set_colormap    set_direction    set_display    set_dither    set_dither_mask    set_drawable    set_encoding    set_font    set_gradient    set_image    set_mask    set_operation    set_progress_granularity    set_ttf_encoding    set_visual    visual    visual    visual=   
Public Class methods
new(VALUE klass)

Return a new Imlib2::Context.

Example:

  ctx = Imlib2::Context.new
pop(VALUE klass)

Pop the top context off the context stack.

Example:

  ctx = Imlib2::Context.pop
get(VALUE klass)

Return the current context.

Example:

  ctx = Imlib2::Context.get
current(VALUE 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(VALUE self, VALUE val)

Set the dither flag.

Example:

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

Set the dither flag.

Example:

  ctx.dither = true
get_dither(VALUE self)

Get the dither flag.

Example:

  if ctx.dither
    puts 'dither enabled.'
  end
dither(VALUE self)

Get the dither flag.

Example:

  if ctx.dither
    puts 'dither enabled.'
  end
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
set_display(VALUE self, VALUE display)

Set the current X11 Display.

Note: This method is not available unless Imlib2-Ruby was compiled with X11 support. You can check the constant Imlib2::X11_SUPPORT to see if X11 support is available.

Examples:

  context.set_display display
  context.display = display
display=(VALUE self, VALUE display)

Set the current X11 Display.

Note: This method is not available unless Imlib2-Ruby was compiled with X11 support. You can check the constant Imlib2::X11_SUPPORT to see if X11 support is available.

Examples:

  context.set_display display
  context.display = display
get_display(VALUE self)

Get the current X11 Display.

Note: This method is not available unless Imlib2-Ruby was compiled with X11 support. You can check the constant Imlib2::X11_SUPPORT to see if X11 support is available.

Examples:

  display = context.get_display
  display = context.display
display(VALUE self)

Get the current X11 Display.

Note: This method is not available unless Imlib2-Ruby was compiled with X11 support. You can check the constant Imlib2::X11_SUPPORT to see if X11 support is available.

Examples:

  display = context.get_display
  display = context.display
set_visual(VALUE self, VALUE visual)

Set the current X11 Visual.

Note: This method is not available unless Imlib2-Ruby was compiled with X11 support. You can check the constant Imlib2::X11_SUPPORT to see if X11 support is available.

Examples:

  context.set_visual visual
  context.visual = visual
visual=(VALUE self, VALUE visual)

Set the current X11 Visual.

Note: This method is not available unless Imlib2-Ruby was compiled with X11 support. You can check the constant Imlib2::X11_SUPPORT to see if X11 support is available.

Examples:

  context.set_visual visual
  context.visual = visual
get_visual(VALUE self)

Get the current X11 Visual.

Note: This method is not available unless Imlib2-Ruby was compiled with X11 support. You can check the constant Imlib2::X11_SUPPORT to see if X11 support is available.

Examples:

  visual = context.get_visual
  visual = context.visual
visual(VALUE self)

Get the current X11 Visual.

Note: This method is not available unless Imlib2-Ruby was compiled with X11 support. You can check the constant Imlib2::X11_SUPPORT to see if X11 support is available.

Examples:

  visual = context.get_visual
  visual = context.visual
set_colormap(p1)
colormap=(p1)
set_cmap(p1)
cmap=(p1)
get_colormap()
colormap()
get_cmap()
cmap()
set_drawable(VALUE self, VALUE drawable)

Set the current X11 Drawable.

Note: This method is not available unless Imlib2-Ruby was compiled with X11 support. You can check the constant Imlib2::X11_SUPPORT to see if X11 support is available.

Examples:

  context.set_drawable drawable
  context.drawable = drawable
drawable=(VALUE self, VALUE drawable)

Set the current X11 Drawable.

Note: This method is not available unless Imlib2-Ruby was compiled with X11 support. You can check the constant Imlib2::X11_SUPPORT to see if X11 support is available.

Examples:

  context.set_drawable drawable
  context.drawable = drawable
get_drawable(VALUE self)

Get the current X11 Drawable.

Note: This method is not available unless Imlib2-Ruby was compiled with X11 support. You can check the constant Imlib2::X11_SUPPORT to see if X11 support is available.

Examples:

  drawable = context.get_drawable
  drawable = context.drawable
drawable(VALUE self)

Get the current X11 Drawable.

Note: This method is not available unless Imlib2-Ruby was compiled with X11 support. You can check the constant Imlib2::X11_SUPPORT to see if X11 support is available.

Examples:

  drawable = context.get_drawable
  drawable = context.drawable
set_mask(VALUE self, VALUE mask_o)

Set the current X11 Mask.

Note: This method is not available unless Imlib2-Ruby was compiled with X11 support. You can check the constant Imlib2::X11_SUPPORT to see if X11 support is available.

Examples:

  context.set_mask mask
  context.mask = mask
mask=(VALUE self, VALUE mask_o)

Set the current X11 Mask.

Note: This method is not available unless Imlib2-Ruby was compiled with X11 support. You can check the constant Imlib2::X11_SUPPORT to see if X11 support is available.

Examples:

  context.set_mask mask
  context.mask = mask
get_mask(VALUE self)

Get the current X11 Mask.

Note: This method is not available unless Imlib2-Ruby was compiled with X11 support. You can check the constant Imlib2::X11_SUPPORT to see if X11 support is available.

Examples:

  mask = context.get_mask
  mask = context.mask
mask(VALUE self)

Get the current X11 Mask.

Note: This method is not available unless Imlib2-Ruby was compiled with X11 support. You can check the constant Imlib2::X11_SUPPORT to see if X11 support is available.

Examples:

  mask = context.get_mask
  mask = context.mask
get_visual(VALUE self)

Get the current X11 Visual.

Note: This method is not available unless Imlib2-Ruby was compiled with X11 support. You can check the constant Imlib2::X11_SUPPORT to see if X11 support is available.

Examples:

  visual = context.get_visual
  visual = context.visual
visual(VALUE self)

Get the current X11 Visual.

Note: This method is not available unless Imlib2-Ruby was compiled with X11 support. You can check the constant Imlib2::X11_SUPPORT to see if X11 support is available.

Examples:

  visual = context.get_visual
  visual = context.visual
get_best_visual(VALUE self)

Get the current X11 Visual.

Note: This method is not available unless Imlib2-Ruby was compiled with X11 support. You can check the constant Imlib2::X11_SUPPORT to see if X11 support is available.

Examples:

  visual = context.get_visual
  visual = context.visual
best_visual(VALUE self)

Get the current X11 Visual.

Note: This method is not available unless Imlib2-Ruby was compiled with X11 support. You can check the constant Imlib2::X11_SUPPORT to see if X11 support is available.

Examples:

  visual = context.get_visual
  visual = context.visual