Class: Sketchup::TextureWriter
- Inherits:
-
Object
- Object
- Sketchup::TextureWriter
- Defined in:
- lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb
Overview
The TextureWriter class is used primarily for writing the textures used in a SketchUp model out to files as part of an export for use in another application. These methods are usually invoked in this order:
- 1. load - load one or more textures from a model into the TextureWriter.
- 2. write_all or write - write the texture(s) to file.
Instance Method Summary collapse
-
#count ⇒ Integer
The #length method is used to determine the number of textures loaded into the texture writer.
-
#filename(handle) ⇒ String
The filename method is used to retrieve the original filename for a particular texture.
-
#handle(*args) ⇒ Object
The handle method is used to retrieve a handle or index for a specific texture in the texture writer.
-
#length ⇒ Integer
The #length method is used to determine the number of textures loaded into the texture writer.
-
#load(*args) ⇒ Object
The load method is used to load one or more textures into the texture writer for writing out to a file.
-
#write(*args) ⇒ Object
The write method is used to write an individual textures, within the texture writer, to a file.
-
#write_all(dirname, filename_format) ⇒ Integer
The write_all method is used to write all of the textures within the texture writer to files.
Instance Method Details
#count ⇒ Integer
47 48 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb', line 47 def count end |
#filename(handle) ⇒ String
The filename method is used to retrieve the original filename for a particular texture.
70 71 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb', line 70 def filename(handle) end |
#handle(entity) ⇒ Integer #handle(face, side) ⇒ Integer
The handle method is used to retrieve a handle or index for a specific texture in the texture writer.
99 100 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb', line 99 def handle(*args) end |
#length ⇒ Integer
118 119 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb', line 118 def length end |
#load(entity) ⇒ Integer #load(face, side) ⇒ Integer
If you are passing a face in as the entity argument when loading a texture you will have to specify the second boolean argument, side. The argument side specifies which side of the face the texture will be loaded from.
The load method is used to load one or more textures into the texture writer for writing out to a file.
152 153 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb', line 152 def load(*args) end |
#write(entity, filename) ⇒ Integer #write(entity, side, filename) ⇒ Integer
If you are passing a face in as the entity argument when writing a texture you will have to specify the boolean argument, side. The argument side controls the side of the face from which the texture will be sampled before writing it.
The write method is used to write an individual textures, within the texture writer, to a file. An entity’s texture must have been loaded into the texture writer before this method can be used to write it’s texture.
This method will return one of the following status messages. (These are constants that are defined by the API.)
- 0 = FILE_WRITE_OK
- 1 = FILE_WRITE_FAILED_INVALID_TIFF
- 2 = FILE_WRITE_FAILED_UNKNOWN
208 209 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb', line 208 def write(*args) end |
#write_all(dirname, filename_format) ⇒ Integer
The write_all method is used to write all of the textures within the texture writer to files. It will return one of three status numbers:
- 0 = FILE_WRITE_OK
- 1 = FILE_WRITE_FAILED_INVALID_TIFF
- 2 = FILE_WRITE_FAILED_UNKNOWN
234 235 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb', line 234 def write_all(dirname, filename_format) end |