|
SketchUp C API
|
References a hatch pattern used for section-fill rendering in SketchUp models. More...
#include <SketchUpAPI/model/hatch_pattern.h>
Related Functions | |
(Note that these are not member functions.) | |
| SUEntityRef | SUHatchPatternToEntity (SUHatchPatternRef hatch_pattern) |
| Converts from an SUHatchPatternRef to an SUEntityRef. This is essentially an upcast operation. More... | |
| SUHatchPatternRef | SUHatchPatternFromEntity (SUEntityRef entity) |
| Converts from an SUEntityRef to an SUHatchPatternRef. This is essentially a downcast operation so the given SUEntityRef must be convertible to an SUHatchPatternRef. More... | |
| enum SUResult | SUHatchPatternCreate (SUHatchPatternRef *hatch_pattern) |
| Creates a new empty hatch pattern object. More... | |
| enum SUResult | SUHatchPatternCreateFromFile (SUHatchPatternRef *hatch_pattern, const char *file_name) |
Creates a hatch pattern object from a .skh file. More... | |
| enum SUResult | SUHatchPatternRelease (SUHatchPatternRef *hatch_pattern) |
| Releases a hatch pattern object that has not been added to a model. More... | |
| enum SUResult | SUHatchPatternGetName (SUHatchPatternRef hatch_pattern, SUStringRef *name) |
| Retrieves the name of a hatch pattern object. More... | |
| enum SUResult | SUHatchPatternSetName (SUHatchPatternRef hatch_pattern, const char *name) |
| Sets the name of a hatch pattern object. More... | |
| enum SUResult | SUHatchPatternGetData (SUHatchPatternRef hatch_pattern, SUHatchPatternDataRef *hatch_pattern_data) |
| Retrieves the fill properties of a hatch pattern object. More... | |
| enum SUResult | SUHatchPatternGetFillColor (SUHatchPatternRef hatch_pattern, SUColor *color) |
| Retrieves the solid fill color of a hatch pattern object. More... | |
| enum SUResult | SUHatchPatternSetFillColor (SUHatchPatternRef hatch_pattern, const SUColor *color) |
| Sets the solid fill color of a hatch pattern object. More... | |
| enum SUResult | SUHatchPatternGetFillTextureImage (SUHatchPatternRef hatch_pattern, SUImageRepRef *image) |
| Retrieves the fill texture image of a hatch pattern object. More... | |
| enum SUResult | SUHatchPatternGetFillTextureFileName (SUHatchPatternRef hatch_pattern, SUStringRef *file_name) |
| Retrieves the file name that the fill texture image of a hatch pattern was loaded from. More... | |
| enum SUResult | SUHatchPatternSetFillTextureImageAndFileName (SUHatchPatternRef hatch_pattern, SUImageRepRef image, const char *file_name) |
| Sets the fill texture image of a hatch pattern object along with the file name it came from. More... | |
| enum SUResult | SUHatchPatternClearFillTexture (SUHatchPatternRef hatch_pattern) |
| Removes the fill texture image from a hatch pattern object. More... | |
| enum SUResult | SUHatchPatternGetUVScale (SUHatchPatternRef hatch_pattern, float *u_scale, float *v_scale) |
| Retrieves the UV scale of a hatch pattern object. More... | |
| enum SUResult | SUHatchPatternSetUVScale (SUHatchPatternRef hatch_pattern, float u_scale, float v_scale) |
| Sets the UV scale of a hatch pattern object. More... | |
| enum SUResult | SUHatchPatternGetRotationAngle (SUHatchPatternRef hatch_pattern, float *angle) |
| Retrieves the rotation angle of a hatch pattern object, in degrees. More... | |
| enum SUResult | SUHatchPatternSetRotationAngle (SUHatchPatternRef hatch_pattern, float angle) |
| Sets the rotation angle of a hatch pattern object, in degrees. More... | |
| enum SUResult | SUHatchPatternGetFillPatternFileName (SUHatchPatternRef hatch_pattern, SUStringRef *file_name) |
Retrieves the file name that the .pat line-pattern definition of a hatch pattern was loaded from. More... | |
| enum SUResult | SUHatchPatternSetFillPatternFromFile (SUHatchPatternRef hatch_pattern, const char *file_name) |
Loads the .pat line-pattern definition of a hatch pattern object from a file. More... | |
| enum SUResult | SUHatchPatternSaveFillPatternToFile (SUHatchPatternRef hatch_pattern, const char *file_name) |
Writes the .pat line-pattern definition of a hatch pattern object to a file. More... | |
| enum SUResult | SUHatchPatternClearFillPattern (SUHatchPatternRef hatch_pattern) |
Removes the .pat line-pattern definition from a hatch pattern object. More... | |
| enum SUResult | SUHatchPatternGetThumbnailImage (SUHatchPatternRef hatch_pattern, SUImageRepRef *image) |
| Retrieves the thumbnail preview image of a hatch pattern object. More... | |
| enum SUResult | SUHatchPatternWriteToFile (SUHatchPatternRef hatch_pattern, const char *file_name) |
Writes a hatch pattern object to a .skh file. More... | |
References a hatch pattern used for section-fill rendering in SketchUp models.
|
related |
Removes the .pat line-pattern definition from a hatch pattern object.
| [in] | hatch_pattern | The hatch pattern object. |
hatch_pattern is not a valid object
|
related |
Removes the fill texture image from a hatch pattern object.
| [in] | hatch_pattern | The hatch pattern object. |
hatch_pattern is not a valid object
|
related |
Creates a new empty hatch pattern object.
The created hatch pattern is not owned by any model. Either add it to a model's hatch patterns collection with SUHatchPatternsAdd(), which transfers ownership, or release it with SUHatchPatternRelease().
| [out] | hatch_pattern | The hatch pattern object created. |
hatch_pattern is NULLhatch_pattern already refers to a valid object
|
related |
Creates a hatch pattern object from a .skh file.
The created hatch pattern is not owned by any model. Either add it to a model's hatch patterns collection with SUHatchPatternsAdd(), which transfers ownership, or release it with SUHatchPatternRelease().
| [out] | hatch_pattern | The hatch pattern object created. |
| [in] | file_name | The path of the .skh file to load. Assumed to be UTF-8 encoded. |
hatch_pattern is NULLhatch_pattern already refers to a valid objectfile_name is NULLfile_name is empty or does not have a .skh extension
|
related |
Converts from an SUEntityRef to an SUHatchPatternRef. This is essentially a downcast operation so the given SUEntityRef must be convertible to an SUHatchPatternRef.
| [in] | entity | The given entity reference. |
|
related |
Retrieves the fill properties of a hatch pattern object.
| [in] | hatch_pattern | The hatch pattern object. |
| [out] | hatch_pattern_data | The fill properties retrieved. |
hatch_pattern is not a valid objecthatch_pattern_data is NULLhatch_pattern_data does not refer to a valid object
|
related |
Retrieves the solid fill color of a hatch pattern object.
| [in] | hatch_pattern | The hatch pattern object. |
| [out] | color | The color retrieved. |
hatch_pattern is not a valid objectcolor is NULL
|
related |
Retrieves the file name that the .pat line-pattern definition of a hatch pattern was loaded from.
| [in] | hatch_pattern | The hatch pattern object. |
| [out] | file_name | The file name retrieved. Empty if no definition has been set. |
hatch_pattern is not a valid objectfile_name is NULLfile_name does not point to a valid SUStringRef object
|
related |
Retrieves the file name that the fill texture image of a hatch pattern was loaded from.
| [in] | hatch_pattern | The hatch pattern object. |
| [out] | file_name | The file name retrieved. Empty if no texture has been set. |
hatch_pattern is not a valid objectfile_name is NULLfile_name does not point to a valid SUStringRef object
|
related |
Retrieves the fill texture image of a hatch pattern object.
image must refer to a valid SUImageRepRef object. The image data is copied into it.
| [in] | hatch_pattern | The hatch pattern object. |
| [out] | image | The image retrieved. |
hatch_pattern is not a valid objectimage is NULLimage does not refer to a valid objecthatch_pattern has no fill texture image
|
related |
Retrieves the name of a hatch pattern object.
| [in] | hatch_pattern | The hatch pattern object. |
| [out] | name | The name retrieved. |
hatch_pattern is not a valid objectname is NULLname does not point to a valid SUStringRef object
|
related |
Retrieves the rotation angle of a hatch pattern object, in degrees.
| [in] | hatch_pattern | The hatch pattern object. |
| [out] | angle | The angle retrieved, in degrees. |
hatch_pattern is not a valid objectangle is NULL
|
related |
Retrieves the thumbnail preview image of a hatch pattern object.
The thumbnail is generated from the hatch pattern's own properties, so it is read only. image must refer to a valid SUImageRepRef object created with SUImageRepCreate(); the image data is copied into it.
| [in] | hatch_pattern | The hatch pattern object. |
| [out] | image | The image retrieved. |
hatch_pattern is not a valid objectimage is NULLimage does not refer to a valid object
|
related |
Retrieves the UV scale of a hatch pattern object.
Both values are scale factors applied to the pattern's repeat.
| [in] | hatch_pattern | The hatch pattern object. |
| [out] | u_scale | The scale along the u axis. |
| [out] | v_scale | The scale along the v axis. |
hatch_pattern is not a valid objectu_scale or v_scale is NULL
|
related |
Releases a hatch pattern object that has not been added to a model.
Only call this on a hatch pattern that SUHatchPatternsAdd() has not taken ownership of. hatch_pattern is set to invalid by this function.
| [in,out] | hatch_pattern | The hatch pattern object. |
hatch_pattern is NULLhatch_pattern does not refer to a valid object
|
related |
Writes the .pat line-pattern definition of a hatch pattern object to a file.
This writes only the line-pattern definition. To write the whole hatch pattern, use SUHatchPatternWriteToFile().
| [in] | hatch_pattern | The hatch pattern object. |
| [in] | file_name | The path of the .pat file to write. Assumed to be UTF-8 encoded. |
hatch_pattern is not a valid objectfile_name is NULLfile_name is emptyhatch_pattern has no line-pattern definition or the file could not be written
|
related |
Sets the solid fill color of a hatch pattern object.
| [in] | hatch_pattern | The hatch pattern object. |
| [in] | color | The color to set. |
hatch_pattern is not a valid objectcolor is NULL
|
related |
Loads the .pat line-pattern definition of a hatch pattern object from a file.
.pat file may hold more than one pattern definition. Only the first definition in the file is loaded; any others are ignored. | [in] | hatch_pattern | The hatch pattern object. |
| [in] | file_name | The path of the .pat file to load. Assumed to be UTF-8 encoded. |
hatch_pattern is not a valid objectfile_name is NULLfile_name is empty
|
related |
Sets the fill texture image of a hatch pattern object along with the file name it came from.
The image and its source file name are a unit, so they are set together. file_name records where the image came from and may be empty for an image that has no file on disk.
| [in] | hatch_pattern | The hatch pattern object. |
| [in] | image | The image to set. |
| [in] | file_name | The file name the image came from. Assumed to be UTF-8 encoded. |
hatch_pattern or image is not a valid objectfile_name is NULLimage does not contain valid image data
|
related |
Sets the name of a hatch pattern object.
The name must not be empty. Once the hatch pattern belongs to a model, the name must also be unique within that model; assigning a hatch pattern its own current name is allowed and does nothing.
| [in] | hatch_pattern | The hatch pattern object. |
| [in] | name | The name to set. Assumed to be UTF-8 encoded. |
hatch_pattern is not a valid objectname is NULLname is empty, or if another hatch pattern in the same model already uses name
|
related |
Sets the rotation angle of a hatch pattern object, in degrees.
| [in] | hatch_pattern | The hatch pattern object. |
| [in] | angle | The angle to set, in degrees. Defaults to 0. |
hatch_pattern is not a valid object
|
related |
Sets the UV scale of a hatch pattern object.
Both values are scale factors applied to the pattern's repeat, and both must be positive.
| [in] | hatch_pattern | The hatch pattern object. |
| [in] | u_scale | The scale to set along the u axis. |
| [in] | v_scale | The scale to set along the v axis. |
hatch_pattern is not a valid objectu_scale or v_scale is not positive
|
related |
Converts from an SUHatchPatternRef to an SUEntityRef. This is essentially an upcast operation.
| [in] | hatch_pattern | The given hatch pattern reference. |
hatch_pattern is a valid object
|
related |
Writes a hatch pattern object to a .skh file.
| [in] | hatch_pattern | The hatch pattern object. |
| [in] | file_name | The path of the .skh file to write. Assumed to be UTF-8 encoded. |
hatch_pattern is not a valid objectfile_name is NULLfile_name is empty or does not have a .skh extension
1.8.3.1