mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-02 04:20:16 +00:00
Changes: * Create render library (move util/render.cpp to render/render.cpp) * Move app::Zoom class to render::Zoom * Remove doc::Image::merge() member function * Add gfx::Clip helper class (to clip dst/src rectangles before a blit) * Move doc::composite_image() to render::composite_image() * Remove doc::Sprite::render() * Replace Sprite::getPixel() with render::get_sprite_pixel() * Remove doc::layer_render() function * Convert DitheringMethod to a enum class * Add AppRender to configure a render::Render with the app configuration * Move checked background preferences as document-specific configuration * Add doc::Sprite::layer() and palette() member functions * Add doc::Layer::cel() member function * Add doc::Palette::entry() member function() * Add doc::frame_t type * Move create_palette_from_rgb/convert_pixel_format to render library * ExportSpriteSheet doesn't need a temporary image now that we can specify the source rectangle in the render routine
36 lines
491 B
C++
36 lines
491 B
C++
// Aseprite Render Library
|
|
// Copyright (c) 2001-2014 David Capello
|
|
//
|
|
// This file is released under the terms of the MIT license.
|
|
// Read LICENSE.txt for more information.
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
#include "config.h"
|
|
#endif
|
|
|
|
#include "render/zoom.h"
|
|
|
|
namespace render {
|
|
|
|
void Zoom::in()
|
|
{
|
|
if (m_den > 1) {
|
|
m_den--;
|
|
}
|
|
else if (m_num < 64) {
|
|
m_num++;
|
|
}
|
|
}
|
|
|
|
void Zoom::out()
|
|
{
|
|
if (m_num > 1) {
|
|
m_num--;
|
|
}
|
|
else if (m_den < 32) {
|
|
m_den++;
|
|
}
|
|
}
|
|
|
|
} // namespace render
|