In Files

Parent

Methods

Files

GD2::Image::IndexedColor

Description

IndexedColor images select pixel colors indirectly through a palette of up to 256 colors. Use Image#palette to access the associated Palette object.

Public Instance Methods

merge_from(other, dst_x, dst_y, src_x, src_y, w, h, pct, gray = false) click to toggle source

Like Image#merge_from except an optional final argument can be specified to preserve the hue of the source by converting the destination pixels to grey scale before the merge.

# File lib/gd2/image.rb, line 753
def merge_from(other, dst_x, dst_y, src_x, src_y, w, h, pct, gray = false)
  return super(other, dst_x, dst_y, src_x, src_y, w, h, pct) unless gray
  SYM[:gdImageCopyMergeGray].call(image_ptr, other.image_ptr,
    dst_x, dst_y, src_x, src_y, w, h, pct.to_percent.round)
  self
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.