module Magick
$Id: misc.rb,v 1.17 2010/03/21 01:43:01 baror Exp $ Copyright (C) 2009 Timothy P. Hunter
Defines paint server classes. Eventually this will include gradients.
RVG
is the main class in this library. All graphic elements must be contained within an RVG
object.
Text-related classes
$Id: units.rb,v 1.5 2009/02/28 23:52:28 rmagick Exp $ Copyright (C) 2009 Timothy P. Hunter
Constants
- AreaGeometry
- AspectGeometry
- GreaterGeometry
- IMAGEMAGICK_VERSION
- LessGeometry
- Long_version
- MANAGED_MEMORY
- MIN_IM_VERSION
- MIN_RUBY_VERSION
- Magick_features
- Magick_version
- MinimumGeometry
- PercentGeometry
- VERSION
- Version
Public Class Methods
Describes the image formats supported by ImageMagick. If the optional block is present, calls the block once for each image format. The first argument, k
, is the format name. The second argument, v
, is the properties string described below.
-
B
is “*” if the format has native blob support, or “ ” otherwise. -
R
is “r” if ImageMagick can read that format, or “-” otherwise. -
W
is “w” if ImageMagick can write that format, or “-” otherwise. -
A
is “+” if the format supports multi-image files, or “-” otherwise.
@overload formats
@return [Hash] the formats hash
@overload formats
@yield [k, v] @yieldparam k [String] the format name @yieldparam v [String] the properties string @return [Magick]
@example
p Magick.formats => {"3FR"=>" r-+", "3G2"=>" r-+", "3GP"=>" r-+", "A"=>"*rw+", ...
# File lib/rmagick_internal.rb, line 55 def formats @formats ||= init_formats if block_given? @formats.each { |k, v| yield k, v } self else @formats end end
If the Magick
module attribute trace_proc
is set to a Proc object, RMagick
calls the proc whenever an image is created or destroyed.
You can use this proc to keep track of which images your program has created and which have been destroyed.
@param p [Proc] The proc object.
The following value will be passed into the proc object. - +which+ - A symbol that indicates which operation the proc is being called for. If the proc is called for an image creation, the value is +:c+. If called for an image destruction, the value is +:d+. - +description+ - A string describing the image. This is the same string that would be returned by calling the image's inspect method. - +id+ - A unique identifier for the image. This identifier is not the same as the object's +object_id+. - +method+ - The name of the method responsible for creating or destroying the image.
@example
Magick.trace_proc = proc do |which, description, id, method| ... end
# File lib/rmagick_internal.rb, line 86 def trace_proc=(p) m = Mutex.new m.synchronize do if @trace_proc.nil? && !p.nil? && !@exit_block_set_up at_exit { @trace_proc = nil } @exit_block_set_up = true end @trace_proc = p end end