pub struct ImageGeneration {
pub icon_path: PathBuf,
pub out_icon_name: String,
pub output_path: PathBuf,
pub force: bool,
}
Fields§
§icon_path: PathBuf
The path to the source icon will be provided to generate mipmap resources.
out_icon_name: String
The output name of the icon that will be generated in mipmap resources.
output_path: PathBuf
Output path to Android resources for generated mipmap resources.
force: bool
Overwrite android resource directory.
Implementations§
Source§impl 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§
Source§impl Clone for ImageGeneration
impl Clone for ImageGeneration
Source§fn clone(&self) -> ImageGeneration
fn clone(&self) -> ImageGeneration
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ImageGeneration
impl Debug for ImageGeneration
Source§impl Default for ImageGeneration
impl Default for ImageGeneration
Source§fn default() -> ImageGeneration
fn default() -> ImageGeneration
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ImageGeneration
impl<'de> Deserialize<'de> for ImageGeneration
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 ImageGeneration
impl RefUnwindSafe for ImageGeneration
impl Send for ImageGeneration
impl Sync for ImageGeneration
impl Unpin for ImageGeneration
impl UnwindSafe for ImageGeneration
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more