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

References a drawing element, which is an abstract base type for some API types. More...

#include <SketchUpAPI/model/drawing_element.h>

Inherits SUEntityRef.

Inherited by SUComponentInstanceRef, SUDimensionRef, SUEdgeRef, SUFaceRef, SUGuideLineRef, SUGuidePointRef, SUImageRef, SUSectionPlaneRef, and SUTextRef.

Related Functions

(Note that these are not member functions.)

SUEntityRef SUDrawingElementToEntity (SUDrawingElementRef elem)
 Converts from an SUDrawingElementRef to an SUEntityRef. This is essentially an upcast operation. More...
 
SUDrawingElementRef SUDrawingElementFromEntity (SUEntityRef entity)
 Converts from an SUEntityRef to an SUDrawingElementRef. This is essentially a downcast operation so the given entity must be convertible to a drawing element. More...
 
enum SURefType SUDrawingElementGetType (SUDrawingElementRef elem)
 Returns the concrete type of the given drawing element. More...
 
enum SUResult SUDrawingElementGetBoundingBox (SUDrawingElementRef elem, struct SUBoundingBox3D *bbox)
 Retrieves the bounding box of a drawing element. More...
 
enum SUResult SUDrawingElementGetMaterial (SUDrawingElementRef elem, SUMaterialRef *material)
 Retrieves the material object of a drawing element. More...
 
enum SUResult SUDrawingElementSetMaterial (SUDrawingElementRef elem, SUMaterialRef material)
 Sets the material of a drawing element. More...
 
enum SUResult SUDrawingElementGetLayer (SUDrawingElementRef elem, SULayerRef *layer)
 Retrieves the layer object associated with a drawing element. More...
 
enum SUResult SUDrawingElementSetLayer (SUDrawingElementRef elem, SULayerRef layer)
 Sets the layer object to be associated with a drawing element. More...
 
enum SUResult SUDrawingElementSetHidden (SUDrawingElementRef elem, bool hide_flag)
 Sets the hide flag of a drawing element. More...
 
enum SUResult SUDrawingElementGetHidden (SUDrawingElementRef elem, bool *hide_flag)
 Retrieves the hide flag of a drawing element. More...
 
enum SUResult SUDrawingElementSetCastsShadows (SUDrawingElementRef elem, bool casts_shadows_flag)
 Sets the casts shadows flag of a drawing element. More...
 
enum SUResult SUDrawingElementGetCastsShadows (SUDrawingElementRef elem, bool *casts_shadows_flag)
 Retrieves the casts shadows flag of a drawing element. More...
 
enum SUResult SUDrawingElementSetReceivesShadows (SUDrawingElementRef elem, bool receives_shadows_flag)
 Sets the receives shadows flag of a drawing element. More...
 
enum SUResult SUDrawingElementGetReceivesShadows (SUDrawingElementRef elem, bool *receives_shadows_flag)
 Retrieves the receives shadows flag of a drawing element. More...
 

Detailed Description

References a drawing element, which is an abstract base type for some API types.

Friends And Related Function Documentation

SUDrawingElementRef SUDrawingElementFromEntity ( SUEntityRef  entity)
related

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

Parameters
[in]entityThe given entity reference.
Returns
  • The converted SUDrawingElementRef if the downcast operation succeeds.
  • If not, the returned reference will be invalid.
enum SUResult SUDrawingElementGetBoundingBox ( SUDrawingElementRef  elem,
struct SUBoundingBox3D bbox 
)
related

Retrieves the bounding box of a drawing element.

Parameters
[in]elemThe drawing element.
[out]bboxThe bounding box retrieved.
Returns
enum SUResult SUDrawingElementGetCastsShadows ( SUDrawingElementRef  elem,
bool *  casts_shadows_flag 
)
related

Retrieves the casts shadows flag of a drawing element.

Parameters
[in]elemThe drawing element.
[out]casts_shadows_flagThe casts shadows flag retrieved.
Returns
enum SUResult SUDrawingElementGetHidden ( SUDrawingElementRef  elem,
bool *  hide_flag 
)
related

Retrieves the hide flag of a drawing element.

Parameters
[in]elemThe drawing element.
[out]hide_flagThe hide flag retrieved.
Returns
enum SUResult SUDrawingElementGetLayer ( SUDrawingElementRef  elem,
SULayerRef layer 
)
related

Retrieves the layer object associated with a drawing element.

Parameters
[in]elemThe drawing element.
[out]layerThe layer object retrieved.
Returns
enum SUResult SUDrawingElementGetMaterial ( SUDrawingElementRef  elem,
SUMaterialRef material 
)
related

Retrieves the material object of a drawing element.

The material object must not be subsequently deallocated while still associated with the drawing element.

Parameters
[in]elemThe drawing element.
[out]materialThe drawing element retrieved.
Returns
enum SUResult SUDrawingElementGetReceivesShadows ( SUDrawingElementRef  elem,
bool *  receives_shadows_flag 
)
related

Retrieves the receives shadows flag of a drawing element.

Parameters
[in]elemThe drawing element.
[out]receives_shadows_flagThe casts shadows flag retrieved.
Returns
enum SURefType SUDrawingElementGetType ( SUDrawingElementRef  elem)
related

Returns the concrete type of the given drawing element.

Parameters
[in]elemThe drawing element.
Returns
  • The concrete type of the given drawing element reference.
  • SURefType_Unknown if entity is not a valid drawing element.
enum SUResult SUDrawingElementSetCastsShadows ( SUDrawingElementRef  elem,
bool  casts_shadows_flag 
)
related

Sets the casts shadows flag of a drawing element.

Parameters
[in]elemThe drawing element.
[in]casts_shadows_flagThe casts shadows flag to set.
Returns
enum SUResult SUDrawingElementSetHidden ( SUDrawingElementRef  elem,
bool  hide_flag 
)
related

Sets the hide flag of a drawing element.

Parameters
[in]elemThe drawing element.
[in]hide_flagThe hide flag to set.
Returns
enum SUResult SUDrawingElementSetLayer ( SUDrawingElementRef  elem,
SULayerRef  layer 
)
related

Sets the layer object to be associated with a drawing element.

Parameters
[in]elemThe drawing element.
[in]layerThe layer object to set.
Returns
enum SUResult SUDrawingElementSetMaterial ( SUDrawingElementRef  elem,
SUMaterialRef  material 
)
related

Sets the material of a drawing element.

The material object must not be subsequently deallocated while associated with the drawing element.

Parameters
[in]elemThe drawing element.
[in]materialThe material object to set. If an invalid reference is given, then the material of the element will be removed.
Returns
enum SUResult SUDrawingElementSetReceivesShadows ( SUDrawingElementRef  elem,
bool  receives_shadows_flag 
)
related

Sets the receives shadows flag of a drawing element.

Parameters
[in]elemThe drawing element.
[in]receives_shadows_flagThe casts shadows flag to set.
Returns
SUEntityRef SUDrawingElementToEntity ( SUDrawingElementRef  elem)
related

Converts from an SUDrawingElementRef to an SUEntityRef. This is essentially an upcast operation.

Parameters
[in]elemThe given drawing element reference.
Returns
  • The converted SUEntityRef if elem is a valid drawing element.
  • If not, the returned reference will be invalid.

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