Struct gdnative::Image
[−]
[src]
pub struct Image { /* fields omitted */ }
core class Image : Resource
(reference counted)
Base class
Image inherits Resource and all of its methods.
Memory management
The lifetime of this object is automatically managed through reference counting.
Methods
impl Image
[src]
pub fn as_resource(&self) -> Resource
[src]
Up-cast.
pub fn new() -> Self
[src]
pub fn new_ref(&self) -> Self
[src]
Creates a new reference to the same object.
pub fn get_width(&self) -> i64
[src]
pub fn get_height(&self) -> i64
[src]
pub fn get_size(&self) -> Vector2
[src]
pub fn has_mipmaps(&self) -> bool
[src]
pub fn get_data(&self) -> ByteArray
[src]
pub fn convert(&mut self, format: i64)
[src]
pub fn get_mipmap_offset(&self, mipmap: i64) -> i64
[src]
pub fn resize_to_po2(&mut self, square: bool)
[src]
pub fn resize(&mut self, width: i64, height: i64, interpolation: i64)
[src]
pub fn shrink_x2(&mut self)
[src]
pub fn expand_x2_hq2x(&mut self)
[src]
pub fn crop(&mut self, width: i64, height: i64)
[src]
pub fn flip_x(&mut self)
[src]
pub fn flip_y(&mut self)
[src]
pub fn generate_mipmaps(&mut self) -> GodotResult
[src]
pub fn clear_mipmaps(&mut self)
[src]
pub fn create(
&mut self,
width: i64,
height: i64,
use_mipmaps: bool,
format: i64
)
[src]
&mut self,
width: i64,
height: i64,
use_mipmaps: bool,
format: i64
)
pub fn create_from_data(
&mut self,
width: i64,
height: i64,
use_mipmaps: bool,
format: i64,
data: ByteArray
)
[src]
&mut self,
width: i64,
height: i64,
use_mipmaps: bool,
format: i64,
data: ByteArray
)
pub fn is_empty(&self) -> bool
[src]
pub fn load(&mut self, path: GodotString) -> GodotResult
[src]
pub fn save_png(&self, path: GodotString) -> GodotResult
[src]
pub fn is_invisible(&self) -> bool
[src]
pub fn compress(
&mut self,
mode: i64,
source: i64,
lossy_quality: f64
) -> GodotResult
[src]
&mut self,
mode: i64,
source: i64,
lossy_quality: f64
) -> GodotResult
pub fn decompress(&mut self) -> GodotResult
[src]
pub fn is_compressed(&self) -> bool
[src]
pub fn fix_alpha_edges(&mut self)
[src]
pub fn premultiply_alpha(&mut self)
[src]
pub fn srgb_to_linear(&mut self)
[src]
pub fn normalmap_to_xy(&mut self)
[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]
&mut self,
src: Option<Image>,
mask: Option<Image>,
src_rect: Rect2,
dst: Vector2
)
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]
&mut self,
src: Option<Image>,
mask: Option<Image>,
src_rect: Rect2,
dst: Vector2
)
pub fn fill(&mut self, color: Color)
[src]
pub fn get_used_rect(&self) -> Rect2
[src]
pub fn get_rect(&self, rect: Rect2) -> Option<Image>
[src]
pub fn copy_from(&mut self, src: Option<Image>)
[src]
pub fn _set_data(&mut self, data: Dictionary)
[src]
pub fn _get_data(&self) -> Dictionary
[src]
pub fn lock(&mut self)
[src]
pub fn unlock(&mut self)
[src]
pub fn set_pixel(&mut self, x: i64, y: i64, color: Color)
[src]
pub fn get_pixel(&self, x: i64, y: i64) -> Color
[src]
pub fn load_png_from_buffer(&mut self, buffer: ByteArray) -> GodotResult
[src]
pub fn load_jpg_from_buffer(&mut self, buffer: ByteArray) -> GodotResult
[src]
pub fn cast<T: GodotObject>(&self) -> Option<T>
[src]
Methods from Deref<Target = Resource>
pub fn as_reference(&self) -> Reference
[src]
Up-cast.
pub fn new_ref(&self) -> Self
[src]
Creates a new reference to the same object.
pub fn _setup_local_to_scene(&mut self)
[src]
pub fn set_path(&mut self, path: GodotString)
[src]
pub fn take_over_path(&mut self, path: GodotString)
[src]
pub fn get_path(&self) -> GodotString
[src]
pub fn set_name(&mut self, name: GodotString)
[src]
pub fn get_name(&self) -> GodotString
[src]
pub fn get_rid(&self) -> Rid
[src]
pub fn set_local_to_scene(&mut self, enable: bool)
[src]
pub fn is_local_to_scene(&self) -> bool
[src]
pub fn get_local_scene(&self) -> Option<Node>
[src]
pub fn setup_local_to_scene(&mut self)
[src]
pub fn duplicate(&self, subresources: bool) -> Option<Resource>
[src]
pub fn cast<T: GodotObject>(&self) -> Option<T>
[src]
Trait Implementations
impl GodotObject for Image
[src]
fn class_name() -> &'static str
[src]
unsafe fn from_sys(obj: *mut godot_object) -> Self
[src]
unsafe fn to_sys(&self) -> *mut godot_object
[src]
impl Deref for Image
[src]
type Target = Resource
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
Dereferences the value.