2 #ifndef _YI_IMAGE_VIEW_H_ 3 #define _YI_IMAGE_VIEW_H_ 134 virtual bool Init()
override;
185 void SetImage(
const std::shared_ptr<CYIAssetTextureBase> &pTexture);
198 virtual void Reset()
override;
283 enum class DisplayState;
285 void AssetReady(
const std::shared_ptr<CYIAsset> &pTex,
const CYIUrl &url);
287 void AssetDownloadCancelled(
const CYIUrl &url);
288 void OnImageDownloadFailed(
const CYIString &rError);
291 std::shared_ptr<CYIMesh> ResizeImageNodeMesh(
CYISceneNode *pNode,
float fNewWidth,
float fNewHeight)
const;
292 void PlayTransitionTimeline(DisplayState from, DisplayState to);
293 void TransitionToState(DisplayState to);
294 void ValidateRepeatMode();
296 DisplayState m_eImageDisplayState;
300 std::unique_ptr<CYIAbstractTimeline> m_pResetTimeline;
315 #endif // _YI_IMAGE_VIEW_H_ The base class for the timeline framework.
Definition: YiAbstractTimeline.h:29
Will proportionally scale the image to fit within the bounds of the 'ImageNode'. There may be negativ...
Definition: YiImageView.h:111
glm::vec3 m_imagePlaceholderAnchorPoint
Definition: YiImageView.h:264
void SetOverlayTextColor(const CYIColor &color)
void SetMipmappingEnabled(bool bEnable)
Definition: YiSceneNode.h:356
Will proportionally scale the image to fill the 'ImageNode', with the excess overflowing beyond the b...
Definition: YiImageView.h:110
CYISceneNode * m_pImageNode
Definition: YiImageView.h:266
The image will be tiled within empty space of the 'ImageNode'.
Definition: YiImageView.h:126
The base class for all view types. Views are containers of renderable elements that often define inte...
Definition: YiSceneView.h:47
Container class for Unicode strings. Conceptually, a CYIString object is a sequence of Unicode charac...
Definition: YiString.h:35
A class that loads data in a pool of threads.
Definition: YiLoadThreadManager.h:37
CYIColor m_DefaultTextColor
Definition: YiImageView.h:270
Will stretch the image to fill the 'ImageNode'. The aspect ratio of the image is not retained...
Definition: YiImageView.h:108
int32_t m_nDefaultFontSize
Definition: YiImageView.h:271
#define YI_TYPE_BASES(...)
Definition: YiRtti.h:350
virtual void OnImageHasChanged()
SCALE_MODE m_eScaleMode
Definition: YiImageView.h:273
A simple view which downloads and renders images.
Definition: YiImageView.h:98
Will proportionally scale the image to fill the 'ImageNode', with the excess being cropped...
Definition: YiImageView.h:109
SCALE_MODE GetScaleMode() const
bool IsMipmappingEnabled() const
float m_fImagePlaceholderWidth
Definition: YiImageView.h:261
const CYIUrl & GetImageUrl() const
std::shared_ptr< CYIMesh > m_pImagePlaceholderMesh
Definition: YiImageView.h:279
void SetImage(const std::shared_ptr< CYIAssetTextureBase > &pTexture)
CYIString m_sDefaultText
Definition: YiImageView.h:269
ssize_t m_nDefaultFontID
Definition: YiImageView.h:272
virtual void Reset() override
virtual void ApplyMeasurements() override
CYIUrl m_ImageUrl
Definition: YiImageView.h:276
std::shared_ptr< CYIMaterial > m_pImagePlaceholderMaterial
Definition: YiImageView.h:280
A scene node is the base type for all nodes which are used by the scene manager; it is an integral pa...
Definition: YiSceneNode.h:114
A scene node type that renders text.
Definition: YiTextSceneNode.h:77
CYISceneNode * GetImageNode() const
std::shared_ptr< CYIAssetTexture > m_pTextAsset
Definition: YiImageView.h:278
A class used to encapsulate an URL.
Definition: YiUrl.h:24
CYISignal ImageAssigned
Definition: YiImageView.h:254
Similar tiling to REPEAT_TILE except the tiles adjacent to the image will be the mirror image of the ...
Definition: YiImageView.h:127
void SetRepeatMode(REPEAT_MODE eRepeatMode)
A download helper class used for downloading assets off of web servers.
Definition: YiAssetDownloadHelper.h:23
The original size and aspect ratio of the image will be retained, and it will overflow the bounds of ...
Definition: YiImageView.h:113
virtual bool Init() override
SCALE_MODE
Definition: YiImageView.h:106
The image will not repeat.
Definition: YiImageView.h:125
bool m_bUseMipmapping
Definition: YiImageView.h:275
int ssize_t
Definition: YiPredefWin32.h:133
CYITextSceneNode * m_pDefaultTextNode
Definition: YiImageView.h:268
float m_fImagePlaceholderHeight
Definition: YiImageView.h:262
CYISignal< const CYIString & > ImageAssignmentFailed
Definition: YiImageView.h:258
void SetOverlayTextSize(const uint32_t &nFontSize)
void SetScaleMode(SCALE_MODE eScaleMode)
REPEAT_MODE GetRepeatMode() const
REPEAT_MODE
Definition: YiImageView.h:123
float m_fImagePlaceholderAspectRatio
Definition: YiImageView.h:263
A class used to represent a color value.
Definition: YiColor.h:31
virtual void Measure(const MeasureSpec &widthSpec, const MeasureSpec &heightSpec, const MeasureSpec &depthSpec) override
Signals and slots are a thread-safe and flexible communication framework that will allow various obje...
Definition: YiSignal.h:164
REPEAT_MODE m_eRepeatMode
Definition: YiImageView.h:274
The edge pixels of the image are stretched to the size of 'ImageNode'.
Definition: YiImageView.h:128
void SetImageUrl(const CYIUrl &url)
FAILURE_TYPE
Definition: YiAssetDownloadHelper.h:32
void SetOverlayText(const CYIString &text)
void SetOverlayTextFontID(const ssize_t &nFontID)
The original size and aspect ratio of the image will be retained, and it will be centered in the midd...
Definition: YiImageView.h:112