Struct editeur::Graphic
[−]
[src]
pub struct Graphic { /* fields omitted */ }
Methods
impl Graphic
[src]
fn get_posture(&self, name: &Sheet) -> Option<&Posture>
fn explicite_emotion(&mut self,
name: &Sheet,
change: &[[Tuple; 50]; 16])
-> Option<&Sprite>
name: &Sheet,
change: &[[Tuple; 50]; 16])
-> Option<&Sprite>
The method explicite_emotion
returns the sprite modified by a list
of emotion.
fn new() -> Result<Self>
The constructor new
returns a Graphic prepared with
the texel and sprite root.
fn get_nct(&self) -> Result<PathBuf>
The accessor method get_nct
returns the texel sub-directory.
fn get_ncs(&self) -> Result<PathBuf>
The accessor method get_ncs
returns the sprite sub-directory.
fn nct_with_ncs(&mut self) -> Result<(PathBuf, PathBuf)>
The accessor method nct_with_ncs
returns a couple
of texel and sprite sub-repositories.
fn get_emotion_list(&self,
posture_key: &Posture,
part_key: &Part)
-> Option<Vec<&Emotion>>
posture_key: &Posture,
part_key: &Part)
-> Option<Vec<&Emotion>>
The accessor method get_emotion_list
returns a list of available emotions
for the Posture key and Part sub-key.
fn get_cell_list(&self,
posture_key: &Posture,
part_key: &Part)
-> Option<Vec<(&Emotion, &Vec<Texel>)>>
posture_key: &Posture,
part_key: &Part)
-> Option<Vec<(&Emotion, &Vec<Texel>)>>
fn get_texel(&self, position: &Posture, 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: AsRef<Path>>(&mut self, source: S) -> Result<()>
The function from_file_texel
insert a texel from a file.
fn insert_from_spritefile<S: AsRef<OsStr> + AsRef<Path>>(&mut self,
source: S)
-> Result<()>
source: S)
-> Result<()>
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 Clone for Graphic
[src]
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
impl Debug for Graphic
[src]
impl Default for Graphic
[src]
A trait for giving a type a useful default value.