Provides special resize behaviour typically useful for images.
Image layers in AE are imported as CYIImageSceneNode.
The following properties are supported by the CYIImageSceneNode:
Label | Default value | Accepted values | Description |
---|---|---|---|
size-mode | stretch | stretch, fill, fit, original-size | The sizing mode which will be applied when the image node size is larger than the original image texture size.
|
repeat-mode | none | none, tile, mirror, clamp | The repeat mode which will be applied when the image node size is larger than the original image texture size.
|
mipmapping | false | true, false | Toggles whether the underlying texture will use mipmapping. |
#include <scenetree/YiImageSceneNode.h>
Public Types | |
enum | SizeMode { SizeMode::Stretch = 0, SizeMode::Fill, SizeMode::Fit, SizeMode::OriginalSize } |
enum | RepeatMode { RepeatMode::None, RepeatMode::Tile, RepeatMode::Mirror, RepeatMode::ClampToEdge } |
![]() | |
enum | LayoutDirtyFlag : uint8_t { LayoutDirtyFlag::Clean, LayoutDirtyFlag::ChildDirty, LayoutDirtyFlag::Dirty } |
enum | LayoutConfigFetchMode { LayoutConfigFetchMode::DoNotLazyInstantiate = 0, LayoutConfigFetchMode::LazyInstantiate } |
enum | MeasureMode { MeasureMode::Unspecified, MeasureMode::UpTo, MeasureMode::Exactly } |
enum | FetchType { FetchType::Optional = 0, FetchType::Mandatory } |
typedef std::reverse_iterator< Iterator > | ReverseIterator |
typedef uint16_t | DirtyFlag |
![]() | |
enum | SpecialEventTargetType : uint8_t { SpecialEventTargetType::None = 0x00, SpecialEventTargetType::NoPick = 0x20 } |
enum | Phase : uint8_t { Phase::Bubble, Phase::Capture } |
Public Member Functions | |
CYIImageSceneNode () | |
virtual | ~CYIImageSceneNode () |
virtual bool | Init () override |
virtual void | SetSize (const glm::vec3 &size, bool dirtyLayout=true) override |
void | SetSizeMode (SizeMode scaleMode) |
SizeMode | GetSizeMode () const |
void | SetRepeatMode (RepeatMode repeatMode) |
RepeatMode | GetRepeatMode () const |
void | SetImageScale (const glm::vec2 &imageScale) |
const glm::vec2 & | GetImageScale () const |
void | SetImageAlignment (const glm::vec2 &imageAlignment) |
const glm::vec2 & | GetImageAlignment () const |
void | SetMipmappingEnabled (bool enable) |
bool | IsMipmappingEnabled () const |
virtual void | Measure (const MeasureSpec &widthSpec, const MeasureSpec &heightSpec, const MeasureSpec &depthSpec) override |
![]() | |
CYISceneNode () | |
virtual | ~CYISceneNode () |
bool | IsInitialized () const |
void | ForceDirty () |
void | SetDirtyFlag (DirtyFlag dirtyFlag) |
DirtyFlag | GetDirtyFlag () const |
DirtyFlag | GetPreviousDirtyFlag () const |
const CYIString & | GetName () const |
CYIString | GetUniqueName () const |
void | SetSceneManager (CYISceneManager *pSceneManager) |
void | SetName (const CYIString &name) |
int32_t | GetID () const |
void | SetID (int32_t id) |
uint64_t | GetUniqueID () const |
bool | AddChild (std::unique_ptr< CYISceneNode > pSceneNode) |
bool | AddChild (std::unique_ptr< CYISceneNode >, size_t index) |
bool | InsertChildAfter (CYISceneNode *pRefNode, std::unique_ptr< CYISceneNode > pSceneNode) |
std::unique_ptr< CYISceneNode > | RemoveChild (CYISceneNode *pSceneNode) |
bool | ReorderChild (size_t fromIndex, size_t toIndex) |
CYITransform * | GetTransform () |
CYISceneNode * | GetParent () const |
bool | ChangeParent (CYISceneNode *pParent) |
CYISceneNode * | GetDrawParent () const |
bool | IsAncestorOf (const CYISceneNode *pNode) const |
CYISceneManager * | GetSceneManager () const |
size_t | GetChildCount () const |
uint32_t | GetChildCountRecursive () const |
CYISceneNode * | GetChild (size_t index) const |
Iterator | begin (Iterator::Mode mode=Iterator::Mode::ImmediateChildren) const |
Iterator | end (Iterator::Mode mode=Iterator::Mode::ImmediateChildren) const |
ReverseIterator | rbegin (Iterator::Mode mode=Iterator::Mode::ImmediateChildren) const |
ReverseIterator | rend (Iterator::Mode mode=Iterator::Mode::ImmediateChildren) const |
CYISceneNode * | GetChild (const CYIString &name) const |
size_t | GetDrawChildCount () const |
CYISceneNode * | GetDrawChild (size_t index) const |
CYISceneNode * | GetDrawChildByID (int32_t id) const |
template<class YI_SCENE_NODE_SUBCLASS > | |
YI_SCENE_NODE_SUBCLASS * | GetChild (uint32_t targetMatchedNodeCount=1) const |
template<class YI_SCENE_NODE_SUBCLASS > | |
std::list< YI_SCENE_NODE_SUBCLASS * > | GetChildren () const |
template<class YI_SCENE_NODE_SUBCLASS > | |
std::list< YI_SCENE_NODE_SUBCLASS * > | GetDrawChildren () const |
size_t | GetIndexOfChild (const CYISceneNode *pSceneNode) const |
size_t | GetIndexOfDrawChild (const CYISceneNode *pSceneNode) const |
void | Show () |
void | Hide () |
void | SetVisibility (bool visible) |
void | SetOpacity (float opacity) |
float | GetCompositeOpacity () const |
float | GetLocalOpacity () const |
bool | IsVisible () const |
bool | IsTrulyVisible () const |
bool | IsPerceptible () const |
CYISceneNode * | GetNode (CYIStringView name) |
CYISceneNode * | GetNode (CYIStringView name, const CYIRuntimeTypeInfo &enforceClassType) |
CYISceneNode * | GetNode (const CYIRuntimeTypeInfo &enforceClassType) |
CYISceneNode * | GetNodeAfterTarget (const CYIRuntimeTypeInfo &enforceClassType, CYISceneNode *pStartAfterTarget) |
template<class YI_SCENE_NODE_SUBCLASS > | |
YI_SCENE_NODE_SUBCLASS * | GetNode (CYIStringView name) |
CYISceneNode * | GetNode (const int32_t id) |
CYISceneNode * | GetNode (const int32_t id, const CYIRuntimeTypeInfo &enforceClassType) |
CYISceneNode * | GetNodeWithUniqueID (uint64_t uniqueID) |
template<class YI_SCENE_NODE_SUBCLASS > | |
bool | FindNode (YI_SCENE_NODE_SUBCLASS *&pNode, CYIStringView nodeName, FetchType type, const CYIString &tag) |
std::list< CYISceneNode * > | GetNodes (CYIStringView name) |
std::list< CYISceneNode * > | GetNodes (int32_t id) |
std::list< CYISceneNode * > | GetNodes (const CYIRuntimeTypeInfo &enforceClassType) |
template<class YI_SCENE_NODE_SUBCLASS > | |
const YI_SCENE_NODE_SUBCLASS * | GetNode (uint32_t targetMatchedNodeCount=1) const |
template<class YI_SCENE_NODE_SUBCLASS > | |
YI_SCENE_NODE_SUBCLASS * | GetNode (uint32_t targetMatchedNodeCount=1) |
void | SetMesh (const std::shared_ptr< CYIMesh > &pMesh) |
bool | SetNPatchBitmap (const std::shared_ptr< CYIBitmap > &pNPatchBitmap) |
void | ClearNPatch () |
void | SetMaterial (const std::shared_ptr< CYIMaterial > &pMaterial, size_t index=0) |
void | AddEffect (const std::shared_ptr< CYIEffect > &pEffect) |
void | RemoveEffect (const std::shared_ptr< CYIEffect > &pEffect) |
size_t | GetEffectCount () const |
const std::shared_ptr< CYIEffect > & | GetEffect (size_t index) const |
void | ConnectEffectsToTimelines (const CYITimelineTrack *pTrack) |
void | AddMask (std::unique_ptr< CYIMask > pMask) |
std::unique_ptr< CYIMask > | RemoveMask (const CYIMask *pMask) |
size_t | GetMaskCount () const |
const CYIMask * | GetMask (size_t index) const |
CYIMask * | GetMask (size_t index) |
const std::shared_ptr< CYIMesh > & | GetMesh () const |
const std::shared_ptr< CYIBitmap > & | GetNPatchBitmap () const |
size_t | GetMaterialCount () const |
const std::shared_ptr< CYIMaterial > & | GetMaterial (size_t index=0) const |
const std::shared_ptr< IYIUniformBufferObject > & | GetShaderUniforms () const |
void | SetMeshTransform (const glm::mat4 &transform) |
void | DestroyChildren () |
glm::mat4 | GetLocalTransform () const |
glm::mat4 | GetWorldTransform () const |
bool | Intersects (const CYISceneNode *pNode) const |
void | SetRenderTarget (const std::shared_ptr< CYIRenderTarget > &pRenderTarget) |
const std::shared_ptr< CYIRenderTarget > & | GetRenderTarget () const |
virtual void | OnPreBuildDrawList (std::vector< IYIRenderer::Command > *pDrawList, std::vector< CYIAbstractCameraSceneNode *> *pDrawWithCameraList) |
virtual void | OnPostBuildDrawList (std::vector< IYIRenderer::Command > *pDrawList) |
const CYIAABB & | GetWorldAABB () const |
const CYIAABB & | GetLocalAABB () const |
void | SetAnchorPoint (const glm::vec3 &anchorPoint) |
void | SetAnchorPoint (float x, float y, float z) |
void | SetAnchorPointX (float x) |
void | SetAnchorPointY (float y) |
void | SetAnchorPointZ (float z) |
void | SetPosition (const glm::vec3 &position) |
void | SetPosition (float x, float y, float z) |
void | SetPositionX (float x) |
void | SetPositionY (float y) |
void | SetPositionZ (float z) |
void | SetRotation (const glm::vec3 &rotation) |
void | SetRotation (float pitchDegrees, float yawDegrees, float rollDegrees) |
void | SetRotationX (float pitchDegrees) |
void | SetRotationY (float yawDegrees) |
void | SetRotationZ (float rollDegrees) |
void | SetOrientation (float pitchDegrees, float yawDegrees, float rollDegrees) |
void | SetOrientation (const glm::quat &orientation) |
void | SetScale (const glm::vec3 &scale) |
void | SetScale (float factorX, float factorY, float factorZ) |
void | SetScaleX (float factor) |
void | SetScaleY (float factor) |
void | SetScaleZ (float factor) |
const glm::vec3 & | GetPosition () const |
const glm::vec3 & | GetScale () const |
const glm::vec3 & | GetWorldScale () const |
const glm::vec3 & | GetWorldSurfaceScale () const |
const glm::vec3 & | GetRotation () const |
const glm::quat & | GetOrientation () const |
const glm::vec3 & | GetAnchorPoint () const |
const glm::vec3 & | GetSize () const |
const glm::vec3 & | GetInitialSize () const |
void | SetMeasuredSize (const glm::vec3 &measuredSize) |
const glm::vec3 & | GetMeasuredSize () const |
void | SetInternalCustomTimelineValue (uint32_t trackID, const CYIVariant &value) |
virtual void | SetCustomTimelineValue (uint32_t trackID, const CYIVariant &value) |
void | SetClippingOn () |
void | SetClippingOff () |
bool | GetClipping () const |
void | SetClippingBox (const CYIAABB &worldBox) |
const CYIAABB & | GetClippingBox () const |
void | StartPropertyAnimation (PropertyAnimation::Type propType, float from, float to, uint32_t durMs, CYITimeInterpolator *pTimeInterpolator=nullptr, bool dirtyLayout=true) |
void | StopPropertyAnimation (PropertyAnimation::Type propType) |
void | UpdateLocalSpaceCollision (CYIActionEvent *pActionEvent) |
virtual bool | BroadcastEvent (const std::shared_ptr< CYIEventDispatcher > &pDispatcher, CYIEvent *pEvent) |
void | UpdateEventForLocalSpace (CYIActionEvent *pActionEvent, glm::vec3 &rayOrigin, glm::vec3 &rayNonOriginPoint) const |
bool | IsBoundingBoxHit (const CYIRay &worldSpaceRay) const |
bool | IsMeshHit (const CYIRay &worldSpaceRay) const |
void | DumpTree () const |
void | StartCaptureKeyboardEvents () |
void | StopCaptureKeyboardEvents () |
void | StartCaptureTrackpadEvents () |
void | StopCaptureTrackpadEvents () |
void | StartCapturePointerEvents (uint8_t pointerID) |
void | StopCapturePointerEvents (uint8_t pointerID) |
bool | DrawBehindChildren (CYISceneNode *pSceneNode, bool *pChanged=nullptr) |
bool | DrawInFrontOfChildren (CYISceneNode *pSceneNode, bool *pChanged=nullptr) |
bool | DrawBehind (CYISceneNode *pSceneNode, bool *pChanged=nullptr) |
bool | DrawInFront (CYISceneNode *pSceneNode, bool *pChanged=nullptr) |
bool | IsFocusRoot () const |
void | SetIsFocusRoot (bool isFocusRoot) |
virtual void | OnFocusGainedInDescendants (CYISceneNode *pNewNodeWithFocus, CYISceneNode *pPreviousNodeWithFocus) |
virtual void | FocusGainedInDescendants (CYISceneNode *pNewNodeWithFocus, CYISceneNode *pPreviousNodeWithFocus) |
virtual void | OnFocusLostInDescendants (CYISceneNode *pNewNodeWithFocus, CYISceneNode *pPreviousNodeWithFocus) |
virtual void | FocusLostInDescendants (CYISceneNode *pNewNodeWithFocus, CYISceneNode *pPreviousNodeWithFocus) |
virtual void | OnFocusChangedInDescendants (CYISceneNode *pNewNodeWithFocus, CYISceneNode *pPreviousNodeWithFocus) |
virtual void | FocusChangedInDescendants (CYISceneNode *pNewNodeWithFocus, CYISceneNode *pPreviousNodeWithFocus) |
virtual bool | ContainsFocusableDescendant (const CYIFocusSearchOptions &options=CYIFocusSearchOptions()) const |
void | SetUseLocalTransformAndAlpha (bool use) |
virtual CYIOptional< CYIStringView > | GetProperty (CYIStringView propertyName) const override |
bool | GetProperty (CYIStringView propertyName, CYIString *pValue) const |
virtual std::map< CYIString, CYIString > | GetProperties () const override |
virtual void | ForEachProperty (const std::function< void(const CYIString &, const CYIString &)> &action) const override |
virtual bool | HasProperties () const override |
void | SetProperty (const CYIString &propertyName, const CYIString &propertyValue) |
std::shared_ptr< CYISceneNodeProxy > | GetSceneNodeProxy () const |
void | SetLayoutConfig (std::unique_ptr< CYILayoutConfig > pLayoutConfig) |
const CYILayoutConfig * | GetLayoutConfig (LayoutConfigFetchMode fetchMode=LayoutConfigFetchMode::LazyInstantiate) const |
CYILayoutConfig * | GetLayoutConfig (LayoutConfigFetchMode fetchMode=LayoutConfigFetchMode::LazyInstantiate) |
void | SetLayoutState (std::unique_ptr< CYILayoutState > pLayoutState) |
const CYILayoutState * | GetLayoutState () const |
CYILayoutState * | GetLayoutState () |
void | RequestLayout () |
LayoutDirtyFlag | GetLayoutDirtyFlag () const |
virtual void | SetLayoutDirtyFlag (LayoutDirtyFlag flag) |
virtual void | ApplyMeasurements () |
virtual CYIAbstractCameraSceneNode * | FindActiveCamera (const CYISceneNode *pTargetSceneNode=nullptr) const |
CYIAccessibilityAttributes::Accessible | GetAccessible () const |
void | SetAccessible (CYIAccessibilityAttributes::Accessible accessible) |
const CYIAccessibilityAttributes * | GetAccessibilityAttributes () const |
std::unique_ptr< CYIAccessibilityAttributes > | TakeAccessibilityAttributes () |
void | SetAccessibilityAttributes (std::unique_ptr< CYIAccessibilityAttributes > pAttributes) |
const CYIRenderable * | GetRenderable () const |
template<typename T > | |
bool | CanCastTo () const |
CYIAdjustmentLayerSceneNode * | GetLastAdjustmentLayer () const |
![]() | |
CYIEventTarget () | |
virtual | ~CYIEventTarget () |
bool | AddEventListener (CYIEvent::Type eventType, CYIEventHandler *pListener, CYIEventTarget::Phase phase=CYIEventTarget::Phase::Bubble) |
bool | RemoveEventListener (CYIEvent::Type eventType, CYIEventHandler *pListener, CYIEventTarget::Phase phase=CYIEventTarget::Phase::Bubble) |
void | SetSpecialTypeFlag (SpecialEventTargetType type) |
void | ClearSpecialTypeFlag (SpecialEventTargetType type) |
SpecialEventTargetType | GetSpecialTypes () const |
const std::shared_ptr< CYIEventTargetProxy > & | GetProxy () const |
![]() | |
CYISignalHandler () | |
CYISignalHandler (const CYISignalHandler &signalHandler) | |
virtual | ~CYISignalHandler () |
CYISignalHandler & | operator= (const CYISignalHandler &signalHandler) |
void | MoveToThread (CYIThread *pThread) |
This function allows the user to override the default thread affinity to any CYIThread that may or may not be running. More... | |
CYIThreadHandle | GetThreadAffinity () const |
void | SetThreadAffinity (const CYIThreadHandle &threadAffinity) |
virtual bool | IsConnected () const |
virtual bool | IsConnected (const CYISignalBase &signal) const |
void | Disconnect (CYISignalBase &signal) |
void | DisconnectFromAllSignals () |
![]() | |
Listener () | |
virtual | ~Listener () |
virtual void | OnThreadStarted (CYIThread *) |
virtual void | OnThreadTerminated (CYIThread *) |
virtual void | OnThreadFinished (CYIThread *) |
![]() | |
virtual | ~IYIPropertiesSource ()=default |
bool | GetProperty (CYIStringView propertyName, CYIString *pValue) const |
Protected Member Functions | |
void | RecalculateMesh () |
![]() | |
void | Update () |
virtual void | OnUpdateBegin () |
virtual void | UpdateBegin () |
virtual void | OnUpdateEnd () |
virtual void | UpdateEnd () |
virtual void | OnDirtyFlagChanged () |
virtual void | DirtyFlagChanged () |
virtual void | OnTransformUpdated () |
virtual void | TransformUpdated () |
virtual void | OnWorldScaleUpdated () |
virtual void | WorldScaleUpdated () |
virtual void | OnWorldSurfaceScaleUpdated () |
virtual void | WorldSurfaceScaleUpdated () |
virtual void | OnVisibilityUpdated () |
virtual void | VisibilityUpdated () |
virtual void | OnCompositeOpacityUpdated () |
virtual void | CompositeOpacityUpdated () |
virtual void | OnWorldBoundingBoxUpdated () |
virtual void | WorldBoundingBoxUpdated () |
virtual void | OnLocalBoundingBoxUpdated () |
virtual void | LocalBoundingBoxUpdated () |
virtual void | OnChildAdded (CYISceneNode *pChild) |
virtual void | ChildAdded (CYISceneNode *pChild) |
virtual void | OnChildRemoved (CYISceneNode *pChild) |
virtual void | ChildRemoved (CYISceneNode *pChild) |
virtual void | OnSizeChanged () |
virtual void | SizeChanged () |
virtual void | ChildNeedsLayout () |
virtual void | LayoutDirtied () |
virtual void | OnChildVisibilityChanged (CYISceneNode *pChild) |
virtual void | ChildVisibilityChanged (CYISceneNode *pChild) |
virtual void | OnDrawOrderChanged () |
virtual bool | ProcessEvent (const std::shared_ptr< CYIEventDispatcher > &pDispatcher, CYIEvent *pEvent) override |
LayoutDirtyFlag | GetCurrentLayoutDirtyFlag () const |
virtual CYIString | GetDumpTreeString () const |
void | DumpTree (int32_t indentLevel) const |
virtual void | SetCustomUniforms () |
template<class T > | |
void | SetNodeType () |
virtual CYISceneNode * | GetNodeFromChildren (CYIStringView name) |
virtual CYISceneNode * | GetNodeFromChildren (const int32_t id) |
virtual CYISceneNode * | GetNodeFromChildren (const CYIRuntimeTypeInfo &enforceClassType) |
CYISceneNode * | GetNodeFromChildrenAfterTarget (const CYIRuntimeTypeInfo &enforceClassType, bool *pTargetReached, CYISceneNode *pStartAfterTarget) |
Additional Inherited Members | |
![]() | |
static void | RegisterAllSceneNodes () |
![]() | |
CYISignal< CYISceneNode *, PropertyAnimation::Type > | PropertyAnimationComplete |
CYISignal< CYISceneNode *, CYISceneNode *> | DescendantGainedFocus |
Emitted when focus has entered this tree. The first signal parameter is the new node with focus, and the second signal parameter is the previous node with focus. More... | |
CYISignal< CYISceneNode *, CYISceneNode *> | DescendantLostFocus |
Emitted when focus has left this tree. The first signal parameter is the new node with focus, and the second signal parameter is the previous node with focus. More... | |
CYISignal< CYISceneNode *, CYISceneNode *> | DescendantsChangedFocus |
Emitted when focus has changed within this tree. This signal is called only if focus was previously within this tree and focus is now on a different node (but still within this tree). The first signal parameter is the new node with focus, and the second signal parameter is the previous node with focus. More... | |
CYISignal< CYIAccessibilityAttributes::Accessible > | AccessibleStateChanged |
Emitted when accessible state changed. More... | |
![]() | |
static const float | OPACITY_NOT_VISIBLE_EPSILON |
static constexpr DirtyFlag | DirtyClean = 0x0000 |
static constexpr DirtyFlag | DirtySceneGraph = 0x0001 |
static constexpr DirtyFlag | DirtyVisibility = 0x0002 |
static constexpr DirtyFlag | DirtyOpacity = 0x0004 |
static constexpr DirtyFlag | DirtyLocalTransform = 0x0008 |
static constexpr DirtyFlag | DirtyWorldTransform = 0x0010 |
static constexpr DirtyFlag | DirtyUniform = 0x0020 |
static constexpr DirtyFlag | DirtyWorldBoundingBox = 0x0040 |
static constexpr DirtyFlag | DirtyMesh = 0x0080 |
static constexpr DirtyFlag | DirtyWorldSurfaceScale = 0x0100 |
static constexpr DirtyFlag | DirtyWorldScale = 0x0200 |
static constexpr DirtyFlag | DirtyLocalBoundingBox = 0x0400 |
static constexpr DirtyFlag | DirtyEverything = (DirtySceneGraph | DirtyVisibility | DirtyOpacity | DirtyLocalTransform | DirtyWorldTransform | DirtyUniform | DirtyWorldBoundingBox | DirtyWorldSurfaceScale | DirtyWorldScale | DirtyLocalBoundingBox) |
|
strong |
When the node is resized, the selected repeat mode dictates how 'empty' space is used.
Default: CYIImageSceneNode::RepeatMode::None
|
strong |
When the node is resized, the selected resize mode dictates how the image appears.
Default: CYIImageSceneNode::SizeMode::Stretch
Enumerator | |
---|---|
Stretch | Will resize the image to the size of the node. The aspect ratio will not be retained. |
Fill | Will resize on either the width or the height, whichever is larger. The image may be larger than the node size. The aspect ratio of the image will be retained. |
Fit | Will resize on either the width or the height, whichever is smaller. The image may be smaller than the node size. The aspect ratio of the image will be retained. |
OriginalSize | The original size and aspect ratio of the image will be retained and the image will be centered in the CYIImageSceneNode. The image may be smaller or larger than the node size. |
CYIImageSceneNode::CYIImageSceneNode | ( | ) |
|
virtual |
const glm::vec2& CYIImageSceneNode::GetImageAlignment | ( | ) | const |
const glm::vec2& CYIImageSceneNode::GetImageScale | ( | ) | const |
RepeatMode CYIImageSceneNode::GetRepeatMode | ( | ) | const |
SizeMode CYIImageSceneNode::GetSizeMode | ( | ) | const |
|
overridevirtual |
Initializes the scene node. Children of the scene node are also recursively initialized.
Subclasses must call CYISceneNode::Init.
Reimplemented from CYISceneNode.
bool CYIImageSceneNode::IsMipmappingEnabled | ( | ) | const |
|
overridevirtual |
Measures this scene node, considering the layout configuration constraints (if available) and the provided measure specifications. The Measure function is used by the layout system to determine the 'desired' size of elements in a container. The result of calls to this function can be accessed through the GetMeasuredSize() function.
Reimplemented from CYISceneNode.
|
protected |
void CYIImageSceneNode::SetImageAlignment | ( | const glm::vec2 & | imageAlignment | ) |
Sets how the image should be aligned when a sizing mode is applied.
For the x component of the alignment, a value of 0.0f will align the left edge of the image to the left side of the size, a value of 1.0f will align the right edge of the image to the right side of the size, and a value of 0.5f will center the image horizontally. For the y component of the alignment, a value of 0.0f will align the top edge of the image to the top side of the size, a value of 1.0f will align the bottom edge of the image to the bottom side of the size, and a value of 0.5f will center the image vertically. Values outside of the 0.0f to 1.0f range are accepted and will behave as one might expect.
By default, the image is centered (using an image alignment of glm::vec2(0.5f, 0.5f)).
void CYIImageSceneNode::SetImageScale | ( | const glm::vec2 & | imageScale | ) |
Sets an image scale for this image node. The image scale is an extra scale that is applied on top of the calculated image size for a given sizing mode. By default, the image scale is 1.0.
void CYIImageSceneNode::SetMipmappingEnabled | ( | bool | enable | ) |
Configures the underlying texture to use mipmapping. Mipmapping is disabled by default.
void CYIImageSceneNode::SetRepeatMode | ( | RepeatMode | repeatMode | ) |
Sets and applies the repeat mode of this node.
|
overridevirtual |
Applies the current resize mode.
Reimplemented from CYISceneNode.
void CYIImageSceneNode::SetSizeMode | ( | SizeMode | scaleMode | ) |
Sets and applies the resize mode of this node.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |