Struct neko::graphic::Graphic
[−]
pub struct Graphic { /* fields omitted */ }
Methods
impl Graphic
fn get_posture(&self, name: &Sheet) -> Option<&Sheet>
fn explicite_emotion(
&mut self,
name: &Sheet,
change: &[[Tuple; 50]; 16]
) -> Option<&Sprite>
&mut self,
name: &Sheet,
change: &[[Tuple; 50]; 16]
) -> Option<&Sprite>
The method explicite_emotion
returns the sprite modified by a list
of emotion.
fn new() -> Result<Graphic, GraphicError>
The constructor new
returns a Graphic prepared with
the texel and sprite root.
fn get_nct(&self) -> Result<PathBuf, GraphicError>
The accessor method get_nct
returns the texel sub-directory.
fn get_ncs(&self) -> Result<PathBuf, GraphicError>
The accessor method get_ncs
returns the sprite sub-directory.
fn nct_with_ncs(&mut self) -> Result<(PathBuf, PathBuf), GraphicError>
The accessor method nct_with_ncs
returns a couple
of texel and sprite sub-repositories.
fn get_emotion_list(
&self,
posture_key: &Sheet,
part_key: &Part
) -> Option<Vec<&Emotion>>
&self,
posture_key: &Sheet,
part_key: &Part
) -> Option<Vec<&Emotion>>
The accessor method get_emotion_list
returns a list of available emotions
for the Sheet key and Part sub-key.
fn get_cell_list(
&self,
posture_key: &Sheet,
part_key: &Part
) -> Option<Vec<(&Emotion, &Vec<Texel>)>>
&self,
posture_key: &Sheet,
part_key: &Part
) -> Option<Vec<(&Emotion, &Vec<Texel>)>>
fn get_texel(&self, position: &Sheet, tuple: &Tuple) -> Option<&Vec<Texel>>
The accessor method get_texel
returns a reference on texel.
fn get_sprite(&self, name: &Sheet) -> Option<&Sprite>
The accessor method get_sprite
returns a reference on sprite.
fn insert_from_texelfile<S>(&mut self, source: S) -> Result<(), GraphicError> where
S: AsRef<Path>,
S: AsRef<Path>,
The function from_file_texel
insert a texel from a file.
fn insert_from_spritefile<S>(&mut self, source: S) -> Result<(), GraphicError> where
S: AsRef<OsStr> + AsRef<Path>,
S: AsRef<OsStr> + AsRef<Path>,
The function from_file_sprite
insert a sprite from a file.
fn add_position(&mut self, position: usize)
The mutator method add_position
changes the position of
the file sprite cursor.
fn sub_position(&mut self, position: usize)
The mutator method sub_position
changes the position of
the file sprite cursor.
fn start_position(&mut self, position: usize)
fn end_position(&mut self, position: usize)
fn add_position_sprite(&mut self, position: usize)
fn sub_position_sprite(&mut self, position: usize)
fn add_position_sprite_draw(&mut self, position: usize)
The mutator method add_position_sprite_draw
changes the position of
the cell board cursor.
fn sub_position_sprite_draw(&mut self, position: usize)
The mutator method sub_position_sprite_draw
changes the position of
the cell board cursor.
fn get_current_cell_number(&self, index: usize) -> Option<(Emotion, Vec<Texel>)>
fn set_current_emotion(&mut self, index: usize)
fn get_current_sprite(&self) -> Option<&(Sheet, Sprite)>
The accessor method get_sprite
returns a reference on sprite.
Trait Implementations
impl Debug for Graphic
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter.
impl Default for Graphic
A trait for giving a type a useful default value.
impl Clone for Graphic
fn clone(&self) -> Graphic
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more