[][src]Struct gdnative_bindings::Image

pub struct Image { /* fields omitted */ }

core class Image inherits Resource (reference counted).

Official documentation

See the documentation of this class in the Godot engine's official documentation.

Memory management

The lifetime of this object is automatically managed through reference counting.

Class hierarchy

Image inherits methods from:

Methods

impl Image[src]

Constants

pub const ALPHA_BLEND: i64[src]

pub const COMPRESS_SOURCE_NORMAL: i64[src]

pub const INTERPOLATE_CUBIC: i64[src]

pub const INTERPOLATE_TRILINEAR: i64[src]

pub const FORMAT_ETC2_RG11: i64[src]

pub const FORMAT_ETC2_R11: i64[src]

pub const FORMAT_R8: i64[src]

pub const FORMAT_MAX: i64[src]

pub const FORMAT_LA8: i64[src]

pub const FORMAT_L8: i64[src]

pub const FORMAT_RGTC_RG: i64[src]

pub const FORMAT_ETC2_RG11S: i64[src]

pub const FORMAT_BPTC_RGBF: i64[src]

pub const FORMAT_PVRTC2A: i64[src]

pub const FORMAT_RG8: i64[src]

pub const FORMAT_DXT1: i64[src]

pub const MAX_HEIGHT: i64[src]

pub const ALPHA_NONE: i64[src]

pub const FORMAT_RGBA4444: i64[src]

pub const FORMAT_PVRTC4A: i64[src]

pub const FORMAT_RH: i64[src]

pub const FORMAT_PVRTC4: i64[src]

pub const FORMAT_ETC2_RGB8: i64[src]

pub const FORMAT_RF: i64[src]

pub const MAX_WIDTH: i64[src]

pub const FORMAT_RGBAF: i64[src]

pub const FORMAT_DXT5: i64[src]

pub const FORMAT_ETC: i64[src]

pub const COMPRESS_SOURCE_SRGB: i64[src]

pub const FORMAT_RGH: i64[src]

pub const COMPRESS_PVRTC4: i64[src]

pub const COMPRESS_S3TC: i64[src]

pub const FORMAT_ETC2_RGB8A1: i64[src]

pub const COMPRESS_SOURCE_GENERIC: i64[src]

pub const FORMAT_ETC2_R11S: i64[src]

pub const FORMAT_RGF: i64[src]

pub const COMPRESS_PVRTC2: i64[src]

pub const FORMAT_BPTC_RGBFU: i64[src]

pub const FORMAT_RGB8: i64[src]

pub const COMPRESS_ETC: i64[src]

pub const FORMAT_RGBA8: i64[src]

pub const FORMAT_RGBE9995: i64[src]

pub const FORMAT_RGTC_R: i64[src]

pub const FORMAT_DXT3: i64[src]

pub const INTERPOLATE_NEAREST: i64[src]

pub const FORMAT_PVRTC2: i64[src]

pub const FORMAT_RGBA5551: i64[src]

pub const ALPHA_BIT: i64[src]

pub const INTERPOLATE_BILINEAR: i64[src]

pub const COMPRESS_ETC2: i64[src]

pub const FORMAT_RGBAH: i64[src]

pub const FORMAT_ETC2_RGBA8: i64[src]

pub const FORMAT_RGBH: i64[src]

pub const FORMAT_RGBF: i64[src]

pub const FORMAT_BPTC_RGBA: i64[src]

impl Image[src]

pub fn new() -> Self[src]

pub fn new_ref(&self) -> Self[src]

Creates a new reference to the same reference-counted object.

pub fn _get_data(&self) -> Dictionary[src]

pub fn _set_data(&mut self, data: Dictionary)[src]

pub fn blend_rect(&mut self, src: Option<Image>, src_rect: Rect2, dst: Vector2)[src]

pub fn blend_rect_mask(
    &mut self,
    src: Option<Image>,
    mask: Option<Image>,
    src_rect: Rect2,
    dst: Vector2
)
[src]

pub fn blit_rect(&mut self, src: Option<Image>, src_rect: Rect2, dst: Vector2)[src]

pub fn blit_rect_mask(
    &mut self,
    src: Option<Image>,
    mask: Option<Image>,
    src_rect: Rect2,
    dst: Vector2
)
[src]

pub fn bumpmap_to_normalmap(&mut self, bump_scale: f64)[src]

pub fn clear_mipmaps(&mut self)[src]

pub fn compress(
    &mut self,
    mode: i64,
    source: i64,
    lossy_quality: f64
) -> GodotResult
[src]

pub fn convert(&mut self, format: i64)[src]

pub fn copy_from(&mut self, src: Option<Image>)[src]

pub fn create(
    &mut self,
    width: i64,
    height: i64,
    use_mipmaps: bool,
    format: i64
)
[src]

pub fn create_from_data(
    &mut self,
    width: i64,
    height: i64,
    use_mipmaps: bool,
    format: i64,
    data: ByteArray
)
[src]

pub fn crop(&mut self, width: i64, height: i64)[src]

pub fn decompress(&mut self) -> GodotResult[src]

pub fn detect_alpha(&self) -> ImageAlphaMode[src]

pub fn expand_x2_hq2x(&mut self)[src]

pub fn fill(&mut self, color: Color)[src]

pub fn fix_alpha_edges(&mut self)[src]

pub fn flip_x(&mut self)[src]

pub fn flip_y(&mut self)[src]

pub fn generate_mipmaps(&mut self, renormalize: bool) -> GodotResult[src]

pub fn get_data(&self) -> ByteArray[src]

pub fn get_format(&self) -> ImageFormat[src]

pub fn get_height(&self) -> i64[src]

pub fn get_mipmap_offset(&self, mipmap: i64) -> i64[src]

pub fn get_pixel(&self, x: i64, y: i64) -> Color[src]

pub fn get_pixelv(&self, src: Vector2) -> Color[src]

pub fn get_rect(&self, rect: Rect2) -> Option<Image>[src]

pub fn get_size(&self) -> Vector2[src]

pub fn get_used_rect(&self) -> Rect2[src]

pub fn get_width(&self) -> i64[src]

pub fn has_mipmaps(&self) -> bool[src]

pub fn is_compressed(&self) -> bool[src]

pub fn is_empty(&self) -> bool[src]

pub fn is_invisible(&self) -> bool[src]

pub fn load(&mut self, path: GodotString) -> GodotResult[src]

pub fn load_jpg_from_buffer(&mut self, buffer: ByteArray) -> GodotResult[src]

pub fn load_png_from_buffer(&mut self, buffer: ByteArray) -> GodotResult[src]

pub fn load_webp_from_buffer(&mut self, buffer: ByteArray) -> GodotResult[src]

pub fn lock(&mut self)[src]

pub fn normalmap_to_xy(&mut self)[src]

pub fn premultiply_alpha(&mut self)[src]

pub fn resize(&mut self, width: i64, height: i64, interpolation: i64)[src]

pub fn resize_to_po2(&mut self, square: bool)[src]

pub fn rgbe_to_srgb(&mut self) -> Option<Image>[src]

pub fn save_png(&self, path: GodotString) -> GodotResult[src]

pub fn set_pixel(&mut self, x: i64, y: i64, color: Color)[src]

pub fn set_pixelv(&mut self, dst: Vector2, color: Color)[src]

pub fn shrink_x2(&mut self)[src]

pub fn srgb_to_linear(&mut self)[src]

pub fn unlock(&mut self)[src]

pub fn to_resource(&self) -> Resource[src]

Up-cast.

pub fn to_reference(&self) -> Reference[src]

Up-cast.

pub fn to_object(&self) -> Object[src]

Up-cast.

pub fn cast<T: GodotObject>(&self) -> Option<T>[src]

Generic dynamic cast.

Methods from Deref<Target = Resource>

pub fn new_ref(&self) -> Self[src]

Creates a new reference to the same reference-counted object.

pub fn _setup_local_to_scene(&mut self)[src]

pub fn duplicate(&self, subresources: bool) -> Option<Resource>[src]

pub fn get_local_scene(&self) -> Option<Node>[src]

pub fn get_name(&self) -> GodotString[src]

pub fn get_path(&self) -> GodotString[src]

pub fn get_rid(&self) -> Rid[src]

pub fn is_local_to_scene(&self) -> bool[src]

pub fn set_local_to_scene(&mut self, enable: bool)[src]

pub fn set_name(&mut self, name: GodotString)[src]

pub fn set_path(&mut self, path: GodotString)[src]

pub fn setup_local_to_scene(&mut self)[src]

pub fn take_over_path(&mut self, path: GodotString)[src]

pub fn init_ref(&mut self) -> bool[src]

Inherited from Reference.

pub fn to_reference(&self) -> Reference[src]

Up-cast.

pub fn to_object(&self) -> Object[src]

Up-cast.

pub fn cast<T: GodotObject>(&self) -> Option<T>[src]

Generic dynamic cast.

Trait Implementations

impl Clone for Image[src]

impl Debug for Image[src]

impl Deref for Image[src]

type Target = Resource

The resulting type after dereferencing.

impl DerefMut for Image[src]

impl Drop for Image[src]

impl FromVariant for Image[src]

impl GodotObject for Image[src]

impl Instanciable for Image[src]

impl ToVariant for Image[src]

Auto Trait Implementations

impl RefUnwindSafe for Image

impl !Send for Image

impl !Sync for Image

impl Unpin for Image

impl UnwindSafe for Image

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.