module GD2

Ruby/GD2 – Ruby binding for gd 2 graphics library

Copyright © 2005 Robert Leslie

This file is part of Ruby/GD2.

Ruby/GD2 is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Ruby/GD2 – Ruby binding for gd 2 graphics library

Copyright © 2005 Robert Leslie

This file is part of Ruby/GD2.

Ruby/GD2 is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Ruby/GD2 – Ruby binding for gd 2 graphics library

Copyright © 2005-2006 Robert Leslie

This file is part of Ruby/GD2.

Ruby/GD2 is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Ruby/GD2 – Ruby binding for gd 2 graphics library

Copyright © 2005 Robert Leslie

This file is part of Ruby/GD2.

Ruby/GD2 is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Constants

ALPHA_MAX
ALPHA_OPAQUE
ALPHA_TRANSPARENT
CMP_BACKGROUND
CMP_COLOR
CMP_IMAGE

Bit flags for GD2::Image#compare

CMP_INTERLACE
CMP_NUM_COLORS
CMP_SIZE_X
CMP_SIZE_Y
CMP_TRANSPARENT
CMP_TRUECOLOR
FMT_COMPRESSED
FMT_RAW

Format flags for GD2::Image#gd2

LIB
MAX_COLORS

Color constants

RGB_MAX
SYM
VERSION

Private Class Methods

gd_library_name() click to toggle source
# File lib/gd2.rb, line 29
def self.gd_library_name
  case Config::CONFIG['arch']
  when /darwin/
    'libgd.2.dylib'
  when /mswin32/, /cygwin/
    'bgd.dll'
  else
    'libgd.so.5'
  end
end
name_for_symbol(symbol, signature) click to toggle source
# File lib/gd2.rb, line 40
def self.name_for_symbol(symbol, signature)
  case Config::CONFIG['arch']
  when /mswin32/, /cygwin/
    sum = -4
    signature.each_byte do |char|
      sum += case char
        when ?D: 8
        else     4
      end
    end
    "#{symbol}@#{sum}"
  else
    symbol.to_s
  end
end