Class: Sketchup::ImageRep
- Inherits:
-
Object
- Object
- Sketchup::ImageRep
- Defined in:
- lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb
Overview
References an image representation object.
Instance Method Summary collapse
-
#bits_per_pixel ⇒ Integer
The #bits_per_pixel method gets the number of bits per pixel in the image.
-
#color_at_uv(u, v, bilinear = false) ⇒ Sketchup::Color?
The #color_at_uv method returns a color corresponding to the UV texture coordinates.
- #colors ⇒ Array<Sketchup::Color>?
-
#data ⇒ String?
The #data method gets the pixel data for an image in a string of bytes.
-
#height ⇒ Integer
The #height method returns the height of an image.
-
#initialize(*args) ⇒ Sketchup::ImageRep
constructor
The #initialize method creates a new image object.
-
#load_file(filepath) ⇒ Object
The #load_file method loads image data from the specified file.
-
#row_padding ⇒ Integer
The #row_padding method returns the size of the row padding of an image in bytes.
-
#save_file(filepath) ⇒ Object
The #save_file method saves an image data object to an image file specified by a path.
- #set_data(width, height, bits_per_pixel, row_padding, pixel_data) ⇒ Sketchup::ImageRep
-
#size ⇒ Integer
The #size method gets the total size of the image data in bytes.
-
#width ⇒ Integer
The #width method returns the width of an image.
Constructor Details
#initialize ⇒ Sketchup::ImageRep #initialize(filepath) ⇒ Sketchup::ImageRep
The #initialize method creates a new image object. The image object will have no data if a path to the image is not provided.
112 113 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb', line 112 def initialize(*args) end |
Instance Method Details
#bits_per_pixel ⇒ Integer
The #bits_per_pixel method gets the number of bits per pixel in the image.
22 23 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb', line 22 def bits_per_pixel end |
#color_at_uv(u, v, bilinear = false) ⇒ Sketchup::Color?
The #color_at_uv method returns a color corresponding to the UV texture coordinates
47 48 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb', line 47 def color_at_uv(u, v, bilinear = false) end |
#colors ⇒ Array<Sketchup::Color>?
61 62 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb', line 61 def colors end |
#data ⇒ String?
The #data method gets the pixel data for an image in a string of bytes.
75 76 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb', line 75 def data end |
#height ⇒ Integer
The #height method returns the height of an image.
88 89 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb', line 88 def height end |
#load_file(filepath) ⇒ Object
The #load_file method loads image data from the specified file.
126 127 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb', line 126 def load_file(filepath) end |
#row_padding ⇒ Integer
The #row_padding method returns the size of the row padding of an image in bytes.
140 141 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb', line 140 def row_padding end |
#save_file(filepath) ⇒ Object
The #save_file method saves an image data object to an image file specified by a path.
155 156 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb', line 155 def save_file(filepath) end |
#set_data(width, height, bits_per_pixel, row_padding, pixel_data) ⇒ Sketchup::ImageRep
The encoding of the pixel_data String parameter should be ASCII-8BIT. Any other encoding could corrupt the binary data.
The #set_data method sets the pixel data of the Sketchup::ImageRep.
197 198 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb', line 197 def set_data(width, height, bits_per_pixel, row_padding, pixel_data) end |
#size ⇒ Integer
The #size method gets the total size of the image data in bytes.
210 211 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb', line 210 def size end |
#width ⇒ Integer
The #width method returns the width of an image.
223 224 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb', line 223 def width end |