StyleBoxImageMask
Inherits: StyleBox < Resource < Reference < Object
Category: Core
Brief Description
Image mask based StyleBox, for mask test.
Member Functions
bool | get_expand ( ) const |
float | get_expand_margin_size ( int margin ) const |
Image | get_image ( ) const |
void | set_expand ( bool expand ) |
void | set_expand_margin_size ( int margin, float size ) |
void | set_image ( Image image ) |
Description
This StyleBox is similar to StyleBoxTexture, but only meant to be used for mask testing. It takes an image and applies stretch rules to determine if the point clicked is masked or not.
Member Function Description
bool get_expand ( ) const
Return whether the expand property is set(default). When expanding, the image will use the same rules as StyleBoxTexture for expand. If not expanding, the image will always be tested at its original size.
float get_expand_margin_size ( int margin ) const
Return the expand margin size (from enum MARGIN_*). Parts of the image below the size of the margin (and in the direction of the margin) will not expand.
Image get_image ( ) const
Return the image used for mask testing. (see set_image).
void set_expand ( bool expand )
Set the expand property (default). When expanding, the image will use the same rules as StyleBoxTexture for expand. If not expanding, the image will always be tested at its original size.
void set_expand_margin_size ( int margin, float size )
Set an expand margin size (from enum MARGIN_*). Parts of the image below the size of the margin (and in the direction of the margin) will not expand.
void set_image ( Image image )
Set the image used for mask testing. Pixels (converted to grey) that have a value, less than 0.5 will fail the test.
© 2014–2020 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.
https://docs.godotengine.org/en/2.1/classes/class_styleboximagemask.html