.. _stdlib_ui_image_component: ======= UIImage ======= ++++++++++++ Enumerations ++++++++++++ .. _enum-public_components-FillMode: .. das:attribute:: FillMode :Values: * **None** = 0 - Default image render * **Horizontal** = 1 - Render image with horizontal filling * **Vertical** = 2 - Render image with vertical filling * **Radial90** = 3 - Render image with radial filling, with center in corners * **Radial180** = 4 - Render image with radial filling, with center in middles of edges * **Radial360** = 5 - Render image with radial filling, with center in middle of image .. _enum-public_components-FillOrigin: .. das:attribute:: FillOrigin :Values: * **Bottom** = 0 - Anchor filling mode to bottom * **Left** = 1 - Anchor filling mode to left * **Top** = 2 - Anchor filling mode to top * **Right** = 3 - Anchor filling mode to right +++++++ Classes +++++++ .. _struct-ui_image_component-UIImage: .. das:attribute:: UIImage : NativeComponent .. note:: ``UIFrame`` component is automatically added to the node if it is not already present This component is used to render UI image in Canvas. The image is positioned in pixels from the center of the viewport. +X is to the right, +Y is to the top. .. note:: Don't forget to set the ``size`` or the image will not be seen Example:: let canvas = create_node() add_component(canvas, new UICanvas()) let image = create_node(NodeData(parent = canvas, position = float3(100.0, 100.0, 0.0) )) add_component(image, new UIImage( textureId = request_texture("image.png"), size = float2(100., 100.) )) :Properties: .. _function-ui_image_component__dot__rq_textureId_UIImage: .. das:operator:: UIImage.textureId() : TextureId .. _function-ui_image_component__dot__rq_textureId_rq_clone_UIImage_TextureId: .. das:operator:: UIImage.textureId =(value: TextureId) Texture of the image. Default is null. :Arguments: * **value** : :ref:`TextureId ` .. _function-ui_image_component__dot__rq_color_UIImage: .. das:operator:: UIImage.color() : float4 .. _function-ui_image_component__dot__rq_color_rq_clone_UIImage_float4: .. das:operator:: UIImage.color =(value: float4) Color of the image. Default is white. :Arguments: * **value** : float4 .. _function-ui_image_component__dot__rq_pivot_UIImage: .. das:operator:: UIImage.pivot() : float2 .. _function-ui_image_component__dot__rq_pivot_rq_clone_UIImage_float2: .. das:operator:: UIImage.pivot =(value: float2) Node's origin relative to it's content. Left-top of the content is (0,0), right-bottom is (1,1). Default is (0.5, 0.5). :Arguments: * **value** : float2 .. _function-ui_image_component__dot__rq_size_UIImage: .. das:operator:: UIImage.size() : float2 .. _function-ui_image_component__dot__rq_size_rq_clone_UIImage_float2: .. das:operator:: UIImage.size =(value: float2) Size of the image. This field can only be accessed in code. The same effect can be achieved by changing ``UIFrame.size`` property. To change the value in editor use ``UIFrame.size`` of the node. :Arguments: * **value** : float2 .. _function-ui_image_component__dot__rq_localPosition2D_UIImage: .. das:operator:: UIImage.localPosition2D() : float2 .. _function-ui_image_component__dot__rq_localPosition2D_rq_clone_UIImage_float2: .. das:operator:: UIImage.localPosition2D =(value: float2) Local position of the image. Default is (0, 0). :Arguments: * **value** : float2 .. _function-ui_image_component__dot__rq_uvRegion_UIImage: .. das:operator:: UIImage.uvRegion() : float4 .. _function-ui_image_component__dot__rq_uvRegion_rq_clone_UIImage_float4: .. das:operator:: UIImage.uvRegion =(value: float4) UV region of the image(X offset, Y offset, X size, Y size). Used for atlas usage. Default is (0, 0, 1, 1). :Arguments: * **value** : float4 .. _function-ui_image_component__dot__rq_nineGrid_UIImage: .. das:operator:: UIImage.nineGrid() : float4 .. _function-ui_image_component__dot__rq_nineGrid_rq_clone_UIImage_float4: .. das:operator:: UIImage.nineGrid =(value: float4) The render mode of the canvas. Default is ScreenSpaceOverlay :Arguments: * **value** : float4 .. _function-ui_image_component__dot__rq_pixelMultiplier_UIImage: .. das:operator:: UIImage.pixelMultiplier() : float .. _function-ui_image_component__dot__rq_pixelMultiplier_rq_clone_UIImage_float: .. das:operator:: UIImage.pixelMultiplier =(value: float) Pixel multiplier. Used for global UI scaling. Default is 1.0. :Arguments: * **value** : float .. _function-ui_image_component__dot__rq_fillMode_UIImage: .. das:operator:: UIImage.fillMode() : FillMode .. _function-ui_image_component__dot__rq_fillMode_rq_clone_UIImage_FillMode: .. das:operator:: UIImage.fillMode =(value: FillMode) Fill mode of the image. Default is None. :Arguments: * **value** : :ref:`FillMode ` .. _function-ui_image_component__dot__rq_fillOrigin_UIImage: .. das:operator:: UIImage.fillOrigin() : FillOrigin .. _function-ui_image_component__dot__rq_fillOrigin_rq_clone_UIImage_FillOrigin: .. das:operator:: UIImage.fillOrigin =(value: FillOrigin) Fill origin of the image. Default is Bottom. :Arguments: * **value** : :ref:`FillOrigin ` .. _function-ui_image_component__dot__rq_fillAmount_UIImage: .. das:operator:: UIImage.fillAmount() : float .. _function-ui_image_component__dot__rq_fillAmount_rq_clone_UIImage_float: .. das:operator:: UIImage.fillAmount =(value: float) Fill amount of the image. Default is 1.0. :Arguments: * **value** : float .. _function-ui_image_component__dot__rq_fillClockwise_UIImage: .. das:operator:: UIImage.fillClockwise() : bool .. _function-ui_image_component__dot__rq_fillClockwise_rq_clone_UIImage_bool: .. das:operator:: UIImage.fillClockwise =(value: bool) Fill clockwise of the image. Default is true. :Arguments: * **value** : bool .. _function-ui_image_component__dot__rq_grayScale_UIImage: .. das:operator:: UIImage.grayScale() : bool .. _function-ui_image_component__dot__rq_grayScale_rq_clone_UIImage_bool: .. das:operator:: UIImage.grayScale =(value: bool) Enable grayscale rendering. Default is false. :Arguments: * **value** : bool .. _function-ui_image_component__dot__rq_grayScaleFactor_UIImage: .. das:operator:: UIImage.grayScaleFactor() : float .. _function-ui_image_component__dot__rq_grayScaleFactor_rq_clone_UIImage_float: .. das:operator:: UIImage.grayScaleFactor =(value: float) Grayscale factor. Used if grayScale is true. Default is 1.0. :Arguments: * **value** : float