pub enum TextureAction {
Clear(Color),
DrawPixels(Box<[DrawPixel]>),
DrawRect {
start: UVec2,
end: UVec2,
color: Color,
},
DrawText {
font: ContentId,
text: String,
top_left: IVec2,
letter_spacing: u32,
full_color: Option<Color>,
alpha_mode: AlphaMode,
target_rect: Option<Rectangle>,
},
DrawScriptTexture {
handle: TextureHandle,
options: DrawTextureOpts,
},
}Expand description
Aktion, die auf einer Textur ausgeführt wird.
An action to perform on a texture.
Variants§
Clear(Color)
Füllt die Textur mit einer Farbe.
Clear the texture with a color.
DrawPixels(Box<[DrawPixel]>)
Zeichnet Pixel auf die Textur.
Draw pixels on the texture.
DrawRect
Zeichnet ein Rechteck auf die Textur.
Draw a rectangle on the texture.
Fields
DrawText
Zeichnet Text auf die Textur.
Draw text on the texture.
Fields
§
letter_spacing: u32Zusätzlicher Buchstabenabstand in Pixeln.
Additional spacing between letters in pixels.
DrawScriptTexture
Zeichnet eine Script-Textur auf die Textur.
Draw a script texture on the texture.
Fields
§
handle: TextureHandleHandle der Quell-Script-Textur.
Handle of the source script texture.
§
options: DrawTextureOptsZeichenoptionen wie Quell- und Zielrechteck.
Drawing options such as source and target rectangles.
Trait Implementations§
Source§impl Clone for TextureAction
impl Clone for TextureAction
Source§impl<'de> Deserialize<'de> for TextureAction
impl<'de> Deserialize<'de> for TextureAction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TextureAction
impl RefUnwindSafe for TextureAction
impl Send for TextureAction
impl Sync for TextureAction
impl Unpin for TextureAction
impl UnsafeUnpin for TextureAction
impl UnwindSafe for TextureAction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more