Class: Sketchup::Texture
- Defined in:
- lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb
Overview
The Texture class contains methods for obtaining information about textures that are part of your materials in your model (within the In-Model section of the Materials Browser). Remember, textures are repeatable images that “tile” when painted on a surface.
Instance Method Summary collapse
-
#average_color ⇒ Sketchup::Color?
The average_color method retrieves a color object with the average color found in the texture.
-
#filename ⇒ String
The filename method retrieves the entire path, including the file, for a texture object.
-
#height ⇒ Integer
The height method is used to get the height of a repeatable texture image, in inches.
-
#image_height ⇒ Integer
The image_height method retrieves the height of the repeatable texture image, in pixels.
-
#image_rep(colorized = false) ⇒ Sketchup::ImageRep
The #image_rep method returns a copy of a ImageRep object representing the texture pixel data.
-
#image_width ⇒ Integer
The image_width method retrieves the width of the repeatable texture image, in pixels.
-
#size=(size) ⇒ Integer, Array(Integer, Integer)
The size= method allows you to set the size of the repeatable texture image, in inches,.
-
#valid? ⇒ Boolean
The valid? method ensures that a texture is valid.
-
#width ⇒ Integer
The width method is used to get the width of a repeatable texture image, in inches.
-
#write(filename, colorize = false) ⇒ Boolean
Writes the texture to file with option to preserve the color adjustments made by the material.
Methods inherited from Entity
#add_observer, #attribute_dictionaries, #attribute_dictionary, #delete_attribute, #deleted?, #entityID, #get_attribute, #inspect, #model, #parent, #persistent_id, #remove_observer, #set_attribute, #to_s, #typename
Instance Method Details
#average_color ⇒ Sketchup::Color?
The average_color method retrieves a color object with the average color found in the texture.
41 42 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb', line 41 def average_color end |
#filename ⇒ String
The filename method retrieves the entire path, including the file, for a texture object.
70 71 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb', line 70 def filename end |
#height ⇒ Integer
The height method is used to get the height of a repeatable texture image, in inches.
82 83 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb', line 82 def height end |
#image_height ⇒ Integer
The image_height method retrieves the height of the repeatable texture image, in pixels.
100 101 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb', line 100 def image_height end |
#image_rep(colorized = false) ⇒ Sketchup::ImageRep
The #image_rep method returns a copy of a ImageRep object representing the texture pixel data.
116 117 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb', line 116 def image_rep(colorized = false) end |
#image_width ⇒ Integer
The image_width method retrieves the width of the repeatable texture image, in pixels.
134 135 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb', line 134 def image_width end |
#size=(size) ⇒ Integer, Array(Integer, Integer)
The size= method allows you to set the size of the repeatable texture image, in inches,
172 173 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb', line 172 def size=(size) end |
#valid? ⇒ Boolean
The valid? method ensures that a texture is valid.
188 189 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb', line 188 def valid? end |
#width ⇒ Integer
The width method is used to get the width of a repeatable texture image, in inches.
200 201 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb', line 200 def width end |
#write(filename, colorize = false) ⇒ Boolean
Writes the texture to file with option to preserve the color adjustments made by the material.
222 223 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb', line 222 def write(filename, colorize = false) end |