CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
OdGiImageBackgroundTraitsData Class Reference

#include <GiEnvironmentTraitsData.h>

Inheritance diagram for OdGiImageBackgroundTraitsData:
OdGiBackgroundTraitsData

Public Member Functions

 OdGiImageBackgroundTraitsData ()
 
const OdStringimageFilename () const
 
void setImageFilename (const OdString &filename)
 
bool fitToScreen () const
 
bool maintainAspectRatio () const
 
bool useTiling () const
 
void setFitToScreen (bool flag)
 
void setMaintainAspectRatio (bool flag)
 
void setUseTiling (bool flag)
 
void setOffset (double x, double y)
 
double xOffset () const
 
double yOffset () const
 
void setXOffset (double xOffset)
 
void setYOffset (double yOffset)
 
void setScale (double x, double y)
 
double xScale () const
 
double yScale () const
 
void setXScale (double xScale)
 
void setYScale (double yScale)
 
bool operator== (const OdGiImageBackgroundTraitsData &data2) const
 
bool operator!= (const OdGiImageBackgroundTraitsData &data2) const
 
- Public Member Functions inherited from OdGiBackgroundTraitsData
OdGiDrawable::DrawableType type () const
 
bool operator== (const OdGiBackgroundTraitsData &data2) const
 
bool operator!= (const OdGiBackgroundTraitsData &data2) const
 

Additional Inherited Members

- Static Public Member Functions inherited from OdGiBackgroundTraitsData
static void deleteBackgroundTraitsData (OdGiBackgroundTraitsData *pBackgroundTraits)
 
- Protected Member Functions inherited from OdGiBackgroundTraitsData
 OdGiBackgroundTraitsData ()
 
- Protected Attributes inherited from OdGiBackgroundTraitsData
OdGiDrawable::DrawableType m_type
 

Detailed Description

Corresponding C++ library: TD_Gi <group OdGi_Classes>

Definition at line 325 of file GiEnvironmentTraitsData.h.

Constructor & Destructor Documentation

◆ OdGiImageBackgroundTraitsData()

OdGiImageBackgroundTraitsData::OdGiImageBackgroundTraitsData ( )
inline

Default constructor for the OdGiImageBackgroundTraitsData class. Creates an instance with default options: background is not fit to screen, aspect ratio is not maintained, tiling is not used and background is an image-based background.

Definition at line 341 of file GiEnvironmentTraitsData.h.

Member Function Documentation

◆ fitToScreen()

bool OdGiImageBackgroundTraitsData::fitToScreen ( ) const
inline

Checks whether image-based background should be fit to screen.

Returns
true if background is fit to screen, false otherwise.

Definition at line 364 of file GiEnvironmentTraitsData.h.

◆ imageFilename()

const OdString & OdGiImageBackgroundTraitsData::imageFilename ( ) const
inline

Retrieves image file name.

Returns
full path to an image file.

Definition at line 349 of file GiEnvironmentTraitsData.h.

◆ maintainAspectRatio()

bool OdGiImageBackgroundTraitsData::maintainAspectRatio ( ) const
inline

Checks whether image-based background maintains aspect ratio.

Returns
true if aspect ratio is maintained, false otherwise.

Definition at line 372 of file GiEnvironmentTraitsData.h.

◆ operator!=()

bool OdGiImageBackgroundTraitsData::operator!= ( const OdGiImageBackgroundTraitsData & data2) const
inline

Checks whether the passed traits for image backgrounds are not equal to these traits. Traits are considered not equal if one of the following conditions fails: Full file paths are equal; Fit to screen flags are equal; Maintain aspect ratio flags are equal; Use tiling flags are equal; Offset distances are equal by both axes; Scale factors are equal by both axes;

Parameters
data2[in] Background traits to compare.
Returns
true if background traits are not equal, false otherwise.

Definition at line 526 of file GiEnvironmentTraitsData.h.

◆ operator==()

bool OdGiImageBackgroundTraitsData::operator== ( const OdGiImageBackgroundTraitsData & data2) const
inline

Checks whether the passed traits for image backgrounds are equal to these traits. Traits are considered equal if: Full file paths are equal; Fit to screen flags are equal; Maintain aspect ratio flags are equal; Use tiling flags are equal; Offset distances are equal by both axes; Scale factors are equal by both axes;

Parameters
data2[in] Background traits to compare.
Returns
true if background traits are equal, false otherwise.

Definition at line 500 of file GiEnvironmentTraitsData.h.

◆ setFitToScreen()

void OdGiImageBackgroundTraitsData::setFitToScreen ( bool flag)
inline

Specifies whether image-based background should be fit to screen.

Parameters
bFitToScreen[in] Flag that specifies whether to fit this background to screen.

Definition at line 387 of file GiEnvironmentTraitsData.h.

◆ setImageFilename()

void OdGiImageBackgroundTraitsData::setImageFilename ( const OdString & filename)
inline

Specifies image file name.

Parameters
filename[in] Full path to an image file.

Definition at line 356 of file GiEnvironmentTraitsData.h.

◆ setMaintainAspectRatio()

void OdGiImageBackgroundTraitsData::setMaintainAspectRatio ( bool flag)
inline

Specifies whether image-based background should maintain aspect ratio. Usually called together with setFitToScreen() methods or other methods which can modify background dimensions.

Parameters
bMaintainAspectRatio[in] Flag that specifies whether to maintain aspect ratio of a background image.

Definition at line 395 of file GiEnvironmentTraitsData.h.

◆ setOffset()

void OdGiImageBackgroundTraitsData::setOffset ( double x,
double y )
inline

Specifies offset of a background by both axes.

Parameters
x[in] Offset distance by x-axis.
y[in] Offset distance by y-axis.

Definition at line 532 of file GiEnvironmentTraitsData.h.

◆ setScale()

void OdGiImageBackgroundTraitsData::setScale ( double x,
double y )
inline

Specifies scale of a background by both axes.

Parameters
x[in] Scale factor by x-axis.
y[in] Scale factor by y-axis.

Definition at line 537 of file GiEnvironmentTraitsData.h.

◆ setUseTiling()

void OdGiImageBackgroundTraitsData::setUseTiling ( bool flag)
inline

Specifies whether to tile image-based background.

Parameters
bUseTiling[in] Flag that specifies whether to tile image-based background.
Remarks
Note that background cannot be tiled if it is set to fit to screen.

Definition at line 405 of file GiEnvironmentTraitsData.h.

◆ setXOffset()

void OdGiImageBackgroundTraitsData::setXOffset ( double xOffset)
inline

Specifies offset of a background on the x-axis.

Parameters
xOffset[in] Offset distance. Negative values mean that background is offset in the opposite direction of x-axis.

Definition at line 436 of file GiEnvironmentTraitsData.h.

◆ setXScale()

void OdGiImageBackgroundTraitsData::setXScale ( double xScale)
inline

Specifies scale of a background on the x-axis.

Parameters
xScale[in] Scale factor for the x-axis.

Definition at line 476 of file GiEnvironmentTraitsData.h.

◆ setYOffset()

void OdGiImageBackgroundTraitsData::setYOffset ( double yOffset)
inline

Specifies offset of a background on the y-axis.

Parameters
yOffset[in] Offset distance. Negative values mean that background is offset in the opposite direction of y-axis.

Definition at line 443 of file GiEnvironmentTraitsData.h.

◆ setYScale()

void OdGiImageBackgroundTraitsData::setYScale ( double yScale)
inline

Specifies scale of a background on the y-axis.

Parameters
yScale[in] Scale factor for the y-axis.

Definition at line 483 of file GiEnvironmentTraitsData.h.

◆ useTiling()

bool OdGiImageBackgroundTraitsData::useTiling ( ) const
inline

Checks whether image-based background is tiled.

Returns
true if background is tiled, false otherwise.

Definition at line 380 of file GiEnvironmentTraitsData.h.

◆ xOffset()

double OdGiImageBackgroundTraitsData::xOffset ( ) const
inline

Retrieves offset of a background on the x-axis.

Returns
offset value on the x-axis.

Definition at line 421 of file GiEnvironmentTraitsData.h.

◆ xScale()

double OdGiImageBackgroundTraitsData::xScale ( ) const
inline

Retrieves scale of a background on the x-axis.

Returns
Scale of the x-axis for this background. Values between 0 and 1 mean that background is shrunk on x-axis, values greater than 1 mean than background is stretched and negative values mean that background is flipped on x-axis.

Definition at line 460 of file GiEnvironmentTraitsData.h.

◆ yOffset()

double OdGiImageBackgroundTraitsData::yOffset ( ) const
inline

Retrieves offset of a background on the y-axis.

Returns
offset value on the y-axis.

Definition at line 429 of file GiEnvironmentTraitsData.h.

◆ yScale()

double OdGiImageBackgroundTraitsData::yScale ( ) const
inline

Retrieves scale of a background on the y-axis.

Returns
Scale of the y-axis for this background. Values between 0 and 1 mean that background is shrunk on y-axis, values greater than 1 mean than background is stretched and negative values mean that background is flipped on y-axis.

Definition at line 469 of file GiEnvironmentTraitsData.h.


The documentation for this class was generated from the following file: