|
SketchUp C API
|
References the section-fill properties of a hatch pattern, without the pattern itself. More...
#include <SketchUpAPI/model/hatch_pattern_data.h>
Related Functions | |
(Note that these are not member functions.) | |
| enum SUResult | SUHatchPatternDataCreate (SUHatchPatternDataRef *hatch_pattern_data) |
| Creates a new hatch pattern data object with default fill properties. More... | |
| enum SUResult | SUHatchPatternDataRelease (SUHatchPatternDataRef *hatch_pattern_data) |
| Releases a hatch pattern data object. More... | |
| enum SUResult | SUHatchPatternDataGetFillColor (SUHatchPatternDataRef hatch_pattern_data, SUColor *color) |
| Retrieves the solid fill color of a hatch pattern data object. More... | |
| enum SUResult | SUHatchPatternDataSetFillColor (SUHatchPatternDataRef hatch_pattern_data, const SUColor *color) |
| Sets the solid fill color of a hatch pattern data object. More... | |
| enum SUResult | SUHatchPatternDataGetFillTextureImage (SUHatchPatternDataRef hatch_pattern_data, SUImageRepRef *image) |
| Retrieves the fill texture image of a hatch pattern data object. More... | |
| enum SUResult | SUHatchPatternDataGetFillTextureFileName (SUHatchPatternDataRef hatch_pattern_data, SUStringRef *file_name) |
| Retrieves the file name that the fill texture image of a hatch pattern data object was loaded from. More... | |
| enum SUResult | SUHatchPatternDataSetFillTextureImageAndFileName (SUHatchPatternDataRef hatch_pattern_data, SUImageRepRef image, const char *file_name) |
| Sets the fill texture image of a hatch pattern data object along with the file name it came from. More... | |
| enum SUResult | SUHatchPatternDataClearFillTexture (SUHatchPatternDataRef hatch_pattern_data) |
| Removes the fill texture image from a hatch pattern data object. More... | |
| enum SUResult | SUHatchPatternDataGetUVScale (SUHatchPatternDataRef hatch_pattern_data, float *u_scale, float *v_scale) |
| Retrieves the UV scale of a hatch pattern data object. More... | |
| enum SUResult | SUHatchPatternDataSetUVScale (SUHatchPatternDataRef hatch_pattern_data, float u_scale, float v_scale) |
| Sets the UV scale of a hatch pattern data object. More... | |
| enum SUResult | SUHatchPatternDataGetRotationAngle (SUHatchPatternDataRef hatch_pattern_data, float *angle) |
| Retrieves the rotation angle of a hatch pattern data object, in degrees. More... | |
| enum SUResult | SUHatchPatternDataSetRotationAngle (SUHatchPatternDataRef hatch_pattern_data, float angle) |
| Sets the rotation angle of a hatch pattern data object, in degrees. More... | |
| enum SUResult | SUHatchPatternDataGetFillPatternFileName (SUHatchPatternDataRef hatch_pattern_data, SUStringRef *file_name) |
Retrieves the file name that the .pat line-pattern definition of a hatch pattern data object was loaded from. More... | |
| enum SUResult | SUHatchPatternDataSetFillPatternFromFile (SUHatchPatternDataRef hatch_pattern_data, const char *file_name) |
Loads the .pat line-pattern definition of a hatch pattern data object from a file. More... | |
| enum SUResult | SUHatchPatternDataSaveFillPatternToFile (SUHatchPatternDataRef hatch_pattern_data, const char *file_name) |
Writes the .pat line-pattern definition of a hatch pattern data object to a file. More... | |
| enum SUResult | SUHatchPatternDataClearFillPattern (SUHatchPatternDataRef hatch_pattern_data) |
Removes the .pat line-pattern definition from a hatch pattern data object. More... | |
| enum SUResult | SUHatchPatternDataIsEqual (SUHatchPatternDataRef hatch_pattern_data, SUHatchPatternDataRef other_hatch_pattern_data, bool *equal) |
| Compares two hatch pattern data objects for equal fill properties. More... | |
References the section-fill properties of a hatch pattern, without the pattern itself.
A hatch pattern data object holds the same fill properties as an SUHatchPatternRef - color, texture, .pat line-pattern definition, scale and rotation - but it is a standalone value rather than an object owned by a model. It has no name, because it does not appear in a model's hatch pattern collection. This is the type a style's section fill is expressed in; see SURenderingOptionsGetHatchPattern() and SURenderingOptionsSetHatchPattern(). To take the fill properties of a model-owned pattern, use SUHatchPatternGetData().
|
related |
Removes the .pat line-pattern definition from a hatch pattern data object.
| [in] | hatch_pattern_data | The hatch pattern data object. |
hatch_pattern_data is not a valid object
|
related |
Removes the fill texture image from a hatch pattern data object.
| [in] | hatch_pattern_data | The hatch pattern data object. |
hatch_pattern_data is not a valid object
|
related |
Creates a new hatch pattern data object with default fill properties.
The created object is standalone and is never owned by a model, so release it with SUHatchPatternDataRelease() when it is no longer needed. Passing it to SURenderingOptionsSetHatchPattern() copies its properties and does not transfer ownership.
| [out] | hatch_pattern_data | The hatch pattern data object created. |
hatch_pattern_data is NULLhatch_pattern_data already refers to a valid object
|
related |
Retrieves the solid fill color of a hatch pattern data object.
| [in] | hatch_pattern_data | The hatch pattern data object. |
| [out] | color | The color retrieved. |
hatch_pattern_data is not a valid objectcolor is NULL
|
related |
Retrieves the file name that the .pat line-pattern definition of a hatch pattern data object was loaded from.
| [in] | hatch_pattern_data | The hatch pattern data object. |
| [out] | file_name | The file name retrieved. Empty if no definition has been set. |
hatch_pattern_data 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 data object was loaded from.
| [in] | hatch_pattern_data | The hatch pattern data object. |
| [out] | file_name | The file name retrieved. Empty if no texture has been set. |
hatch_pattern_data 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 data object.
image must refer to a valid SUImageRepRef object. The image data is copied into it.
| [in] | hatch_pattern_data | The hatch pattern data object. |
| [out] | image | The image retrieved. |
hatch_pattern_data is not a valid objectimage is NULLimage does not refer to a valid objecthatch_pattern_data has no fill texture image
|
related |
Retrieves the rotation angle of a hatch pattern data object, in degrees.
| [in] | hatch_pattern_data | The hatch pattern data object. |
| [out] | angle | The angle retrieved, in degrees. |
hatch_pattern_data is not a valid objectangle is NULL
|
related |
Retrieves the UV scale of a hatch pattern data object.
Both values are scale factors applied to the pattern's repeat.
| [in] | hatch_pattern_data | The hatch pattern data object. |
| [out] | u_scale | The scale along the u axis. |
| [out] | v_scale | The scale along the v axis. |
hatch_pattern_data is not a valid objectu_scale or v_scale is NULL
|
related |
Compares two hatch pattern data objects for equal fill properties.
Two objects compare equal when they would produce the same section fill, regardless of which object each was obtained from.
| [in] | hatch_pattern_data | The first hatch pattern data object. |
| [in] | other_hatch_pattern_data | The second hatch pattern data object. |
| [out] | equal | Whether the two objects have equal fill properties. |
hatch_pattern_data or other_hatch_pattern_data is not a valid objectequal is NULL
|
related |
Releases a hatch pattern data object.
hatch_pattern_data is set to invalid by this function.
| [in,out] | hatch_pattern_data | The hatch pattern data object. |
hatch_pattern_data is NULLhatch_pattern_data does not refer to a valid object
|
related |
Writes the .pat line-pattern definition of a hatch pattern data object to a file.
| [in] | hatch_pattern_data | The hatch pattern data object. |
| [in] | file_name | The path of the .pat file to write. Assumed to be UTF-8 encoded. |
hatch_pattern_data is not a valid objectfile_name is NULLfile_name is emptyhatch_pattern_data has no line-pattern definition or the file could not be written
|
related |
Sets the solid fill color of a hatch pattern data object.
| [in] | hatch_pattern_data | The hatch pattern data object. |
| [in] | color | The color to set. |
hatch_pattern_data is not a valid objectcolor is NULL
|
related |
Loads the .pat line-pattern definition of a hatch pattern data 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_data | The hatch pattern data object. |
| [in] | file_name | The path of the .pat file to load. Assumed to be UTF-8 encoded. |
hatch_pattern_data is not a valid objectfile_name is NULLfile_name is empty
|
related |
Sets the fill texture image of a hatch pattern data 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_data | The hatch pattern data 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_data or image is not a valid objectfile_name is NULLimage does not contain valid image data
|
related |
Sets the rotation angle of a hatch pattern data object, in degrees.
| [in] | hatch_pattern_data | The hatch pattern data object. |
| [in] | angle | The angle to set, in degrees. Defaults to 0. |
hatch_pattern_data is not a valid object
|
related |
Sets the UV scale of a hatch pattern data object.
Both values are scale factors applied to the pattern's repeat, and both must be positive. Neither axis is changed when either value is rejected.
| [in] | hatch_pattern_data | The hatch pattern data 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_data is not a valid objectu_scale or v_scale is not positive
1.8.3.1