SketchUp C API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Related Functions
SULineStyleRef Struct Reference

References a line style. More...

#include <SketchUpAPI/model/line_style.h>

Inherits SUEntityRef.

Related Functions

(Note that these are not member functions.)

SUEntityRef SULineStyleToEntity (SULineStyleRef line_style)
 Converts from a SULineStyleRef to an SUEntityRef. This is essentially an upcast operation. More...
 
SULineStyleRef SULineStyleFromEntity (SUEntityRef entity_ref)
 Converts from an SUEntityRef to a SULineStyleRef. This is essentially a downcast operation so the given entity must be convertible to a SULineStyleRef. More...
 
enum SUResult SULineStyleGetName (SULineStyleRef line_style, SUStringRef *name)
 Retrieves the name of a line style object. More...
 
enum SUResult SULineStyleGetWidthPixels (SULineStyleRef line_style, double *pixel_width)
 Retrieves the pixel width of a line style. More...
 
enum SUResult SULineStyleSetWidthPixels (SULineStyleRef line_style, double pixel_width)
 Sets the pixel width of a line style. Must be greater than 0. More...
 
enum SUResult SULineStyleGetLengthMultiplier (SULineStyleRef line_style, double *length_multiplier)
 Retrieves the length multiplier of a line style. This value is used to scale the applied stipple of the line. More...
 
enum SUResult SULineStyleSetLengthMultiplier (SULineStyleRef line_style, double length_multiplier)
 Sets the length multiplier of a line style. Must be a non-zero value. Default is 1. This value is used to scale the applied stipple pattern of the line. Positive values will be applied directly (ie a value of 2.0 will stretch the stipple pattern by a factor of 2). Negative values will be divided by the line width such that the final scale equals abs(length_multiplier) / current_line_width. More...
 
enum SUResult SULineStyleGetColor (SULineStyleRef line_style, SUColor *color)
 Retrieves the color value of a line style object. More...
 
enum SUResult SULineStyleSetColor (SULineStyleRef line_style, const SUColor *color)
 Sets the color of a line style object. More...
 
enum SUResult SULineStyleCreateCopy (SULineStyleRef line_style, const char *name, SULineStyleRef *destination)
 Creates a new line style object by copying an existing one. More...
 
enum SUResult SULineStyleRelease (SULineStyleRef *line_style)
 Deallocates a line style object. More...
 
enum SUResult SULineStyleIsUserCreated (SULineStyleRef line_style, bool *is_user_created)
 Indicates whether the line style object is user created or not. More...
 

Detailed Description

References a line style.

Friends And Related Function Documentation

enum SUResult SULineStyleCreateCopy ( SULineStyleRef  line_style,
const char *  name,
SULineStyleRef destination 
)
related

Creates a new line style object by copying an existing one.

Since
SketchUp 2020.1, API 8.1
Parameters
[in]line_styleThe line style object to copy.
[in]nameThe name to apply to the new line style object.
[out]destinationThe new line style object that is created.
Returns
SULineStyleRef SULineStyleFromEntity ( SUEntityRef  entity_ref)
related

Converts from an SUEntityRef to a SULineStyleRef. This is essentially a downcast operation so the given entity must be convertible to a SULineStyleRef.

Since
SketchUp 2020.1, API 8.1
Parameters
[in]entity_refThe given entity reference.
Returns
  • The converted SULineStyleRef if the downcast operation succeeds
  • If not, the returned reference will be invalid
enum SUResult SULineStyleGetColor ( SULineStyleRef  line_style,
SUColor color 
)
related

Retrieves the color value of a line style object.

Since
SketchUp 2020.1, API 8.1
Parameters
[in]line_styleThe line style object.
[out]colorThe color value retrieved.
Returns
enum SUResult SULineStyleGetLengthMultiplier ( SULineStyleRef  line_style,
double *  length_multiplier 
)
related

Retrieves the length multiplier of a line style. This value is used to scale the applied stipple of the line.

Since
SketchUp 2019, API 7.0
Parameters
[in]line_styleThe line style object.
[out]length_multiplierThe length multiplier retrieved.
Returns
enum SUResult SULineStyleGetName ( SULineStyleRef  line_style,
SUStringRef name 
)
related

Retrieves the name of a line style object.

Since
SketchUp 2019, API 7.0
Parameters
[in]line_styleThe line style object.
[out]nameThe name retrieved.
Returns
enum SUResult SULineStyleGetWidthPixels ( SULineStyleRef  line_style,
double *  pixel_width 
)
related

Retrieves the pixel width of a line style.

Since
SketchUp 2019, API 7.0
Parameters
[in]line_styleThe line style object.
[out]pixel_widthThe pixel width retrieved.
Returns
enum SUResult SULineStyleIsUserCreated ( SULineStyleRef  line_style,
bool *  is_user_created 
)
related

Indicates whether the line style object is user created or not.

Since
SketchUp 2020.1, API 8.1
Parameters
[in]line_styleThe line style object.
[out]is_user_createdThe boolean value retrieved.
Returns
enum SUResult SULineStyleRelease ( SULineStyleRef line_style)
related

Deallocates a line style object.

The line style object to be deallocated must not be associated with a line style manager.

Since
SketchUp 2020.1, API 8.1
Parameters
[in]line_styleThe line style object to release.
Returns
enum SUResult SULineStyleSetColor ( SULineStyleRef  line_style,
const SUColor color 
)
related

Sets the color of a line style object.

Since
SketchUp 2020.1, API 8.1
Parameters
[in]line_styleThe line style object.
[in]colorThe color value to set the line style color.
Returns
enum SUResult SULineStyleSetLengthMultiplier ( SULineStyleRef  line_style,
double  length_multiplier 
)
related

Sets the length multiplier of a line style. Must be a non-zero value. Default is 1. This value is used to scale the applied stipple pattern of the line. Positive values will be applied directly (ie a value of 2.0 will stretch the stipple pattern by a factor of 2). Negative values will be divided by the line width such that the final scale equals abs(length_multiplier) / current_line_width.

Note
The restrictions on length_multiplier were relaxed in SketchUp 2020.2, API 8.2 from requiring that length_multiplier be a positive value to requiring that length_multiplier be non-zero.
Since
SketchUp 2019, API 7.0
Parameters
[in]line_styleThe line style object.
[in]length_multiplierThe new length multiplier of the line style.
Returns
enum SUResult SULineStyleSetWidthPixels ( SULineStyleRef  line_style,
double  pixel_width 
)
related

Sets the pixel width of a line style. Must be greater than 0.

Note
The restrictions on pixel_width were relaxed in SketchUp 2020.2, API 8.2 from requiring that pixel_width be greater than or equal to one to requiring that it be greater than zero.
Since
SketchUp 2019, API 7.0
Parameters
[in]line_styleThe line style object.
[in]pixel_widthThe new pixel width of the line style.
Returns
SUEntityRef SULineStyleToEntity ( SULineStyleRef  line_style)
related

Converts from a SULineStyleRef to an SUEntityRef. This is essentially an upcast operation.

Since
SketchUp 2020.1, API 8.1
Parameters
[in]line_styleThe given line style reference.
Returns
  • The converted SUEntityRef if line_style is a valid line style
  • If not, the returned reference will be invalid

The documentation for this struct was generated from the following files: