Struct crossbundle_tools::commands::android::ImageGeneration
source · [−]pub struct ImageGeneration {
pub icon_path: PathBuf,
pub out_icon_name: String,
pub output_path: PathBuf,
pub force: bool,
}Fields
icon_path: PathBufThe path to the source icon will be provided to generate mipmap resources.
out_icon_name: StringThe output name of the icon that will be generated in mipmap resources.
output_path: PathBufOutput path to Android resources for generated mipmap resources.
force: boolOverwrite android resource directory.
Implementations
sourceimpl ImageGeneration
impl ImageGeneration
sourcepub fn gen_mipmap_res_from_icon(&self) -> Result<()>
pub fn gen_mipmap_res_from_icon(&self) -> Result<()>
Generate mipmap resources from the icon. Width and height of the icon must be equal.
sourcepub fn write_image(&self, mipmap_name: &str, scaled: DynamicImage) -> Result<()>
pub fn write_image(&self, mipmap_name: &str, scaled: DynamicImage) -> Result<()>
Check res directory and then create mipmap resource if it’s empty
Trait Implementations
sourceimpl Clone for ImageGeneration
impl Clone for ImageGeneration
sourcefn clone(&self) -> ImageGeneration
fn clone(&self) -> ImageGeneration
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for ImageGeneration
impl Debug for ImageGeneration
sourceimpl Default for ImageGeneration
impl Default for ImageGeneration
sourcefn default() -> ImageGeneration
fn default() -> ImageGeneration
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for ImageGeneration
impl<'de> Deserialize<'de> for ImageGeneration
sourcefn 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
sourceimpl Serialize for ImageGeneration
impl Serialize for ImageGeneration
Auto Trait Implementations
impl RefUnwindSafe for ImageGeneration
impl Send for ImageGeneration
impl Sync for ImageGeneration
impl Unpin for ImageGeneration
impl UnwindSafe for ImageGeneration
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more