mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-25 09:35:25 +00:00
Add Sprite::first/lastLayer() member functions
This commit is contained in:
parent
1321de9d58
commit
e975d1c710
@ -208,6 +208,16 @@ LayerIndex Sprite::countLayers() const
|
||||
return LayerIndex(folder()->getLayersCount());
|
||||
}
|
||||
|
||||
LayerIndex Sprite::firstLayer() const
|
||||
{
|
||||
return LayerIndex(0);
|
||||
}
|
||||
|
||||
LayerIndex Sprite::lastLayer() const
|
||||
{
|
||||
return LayerIndex(folder()->getLayersCount()-1);
|
||||
}
|
||||
|
||||
Layer* Sprite::layer(int layerIndex) const
|
||||
{
|
||||
return indexToLayer(LayerIndex(layerIndex));
|
||||
|
@ -78,6 +78,8 @@ namespace doc {
|
||||
LayerImage* backgroundLayer() const;
|
||||
|
||||
LayerIndex countLayers() const;
|
||||
LayerIndex firstLayer() const;
|
||||
LayerIndex lastLayer() const;
|
||||
|
||||
Layer* layer(int layerIndex) const;
|
||||
Layer* indexToLayer(LayerIndex index) const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user