Class: ZPNG::BMP::TypedBlock

Inherits:
Struct
  • Object
show all
Defined in:
lib/zpng/bmp/reader.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dataObject

Returns the value of attribute data

Returns:

  • (Object)

    the current value of data



64
65
66
# File 'lib/zpng/bmp/reader.rb', line 64

def data
  @data
end

#offsetObject

Returns the value of attribute offset

Returns:

  • (Object)

    the current value of offset



64
65
66
# File 'lib/zpng/bmp/reader.rb', line 64

def offset
  @offset
end

#sizeObject

Returns the value of attribute size

Returns:

  • (Object)

    the current value of size



64
65
66
# File 'lib/zpng/bmp/reader.rb', line 64

def size
  @size
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



64
65
66
# File 'lib/zpng/bmp/reader.rb', line 64

def type
  @type
end

Instance Method Details

#inspectObject



65
66
67
68
69
70
# File 'lib/zpng/bmp/reader.rb', line 65

def inspect
  # string length of 16 is for alignment with BITMAP....HEADER chunks on
  # zpng CLI output
  "<%s size=%-5d (0x%-4x) offset=%-5d (0x%-4x)>" %
    [type, size, size, offset, offset]
end

#packObject



71
# File 'lib/zpng/bmp/reader.rb', line 71

def pack; data; end