[aseprite] 45/196: Rename she::CommonFont to SpriteSheetFont
Tobias Hansen
thansen at moszumanska.debian.org
Wed Apr 20 18:49:59 UTC 2016
This is an automated email from the git hooks/post-receive script.
thansen pushed a commit to branch master
in repository aseprite.
commit 97f1d0f8959e5c24539a736ab46b97d63efcb902
Author: David Capello <davidcapello at gmail.com>
Date: Mon Mar 7 17:39:02 2016 -0300
Rename she::CommonFont to SpriteSheetFont
---
src/she/common/locked_surface.h | 8 ++++----
src/she/common/{font.h => sprite_sheet_font.h} | 12 ++++++------
src/she/common/system.h | 6 +++---
src/she/skia/skia_surface.h | 6 +++---
4 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/src/she/common/locked_surface.h b/src/she/common/locked_surface.h
index cd7cf86..04e7e80 100644
--- a/src/she/common/locked_surface.h
+++ b/src/she/common/locked_surface.h
@@ -1,5 +1,5 @@
// SHE library
-// Copyright (C) 2012-2015 David Capello
+// Copyright (C) 2012-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
@@ -90,11 +90,11 @@ public:
}
void drawChar(Font* font, gfx::Color fg, gfx::Color bg, int x, int y, int chr) override {
- CommonFont* commonFont = static_cast<CommonFont*>(font);
+ SpriteSheetFont* ssFont = static_cast<SpriteSheetFont*>(font);
- gfx::Rect charBounds = commonFont->getCharBounds(chr);
+ gfx::Rect charBounds = ssFont->getCharBounds(chr);
if (!charBounds.isEmpty()) {
- ScopedSurfaceLock lock(commonFont->getSurfaceSheet());
+ ScopedSurfaceLock lock(ssFont->getSurfaceSheet());
drawColoredRgbaSurface(lock, fg, bg, gfx::Clip(x, y, charBounds));
}
}
diff --git a/src/she/common/font.h b/src/she/common/sprite_sheet_font.h
similarity index 91%
rename from src/she/common/font.h
rename to src/she/common/sprite_sheet_font.h
index c7de30d..09a0fdf 100644
--- a/src/she/common/font.h
+++ b/src/she/common/sprite_sheet_font.h
@@ -4,8 +4,8 @@
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
-#ifndef SHE_COMMON_FONT_H
-#define SHE_COMMON_FONT_H
+#ifndef SHE_SPRITE_SHEET_FONT_H
+#define SHE_SPRITE_SHEET_FONT_H
#pragma once
#include "base/debug.h"
@@ -20,13 +20,13 @@
namespace she {
-class CommonFont : public Font {
+class SpriteSheetFont : public Font {
public:
- CommonFont() : m_sheet(nullptr) {
+ SpriteSheetFont() : m_sheet(nullptr) {
}
- ~CommonFont() {
+ ~SpriteSheetFont() {
ASSERT(m_sheet);
m_sheet->dispose();
}
@@ -74,7 +74,7 @@ public:
}
static Font* fromSurface(Surface* sur) {
- CommonFont* font = new CommonFont;
+ SpriteSheetFont* font = new SpriteSheetFont;
font->m_sheet = sur;
ScopedSurfaceLock surLock(sur);
diff --git a/src/she/common/system.h b/src/she/common/system.h
index 911725a..8a3267d 100644
--- a/src/she/common/system.h
+++ b/src/she/common/system.h
@@ -1,5 +1,5 @@
// SHE library
-// Copyright (C) 2012-2015 David Capello
+// Copyright (C) 2012-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
@@ -19,7 +19,7 @@
#include "she/native_dialogs.h"
#endif
-#include "she/common/font.h"
+#include "she/common/sprite_sheet_font.h"
namespace she {
@@ -75,7 +75,7 @@ public:
Font* font = nullptr;
if (sheet) {
sheet->applyScale(scale);
- font = CommonFont::fromSurface(sheet);
+ font = SpriteSheetFont::fromSurface(sheet);
}
return font;
}
diff --git a/src/she/skia/skia_surface.h b/src/she/skia/skia_surface.h
index 7d6298a..d2c1d75 100644
--- a/src/she/skia/skia_surface.h
+++ b/src/she/skia/skia_surface.h
@@ -1,5 +1,5 @@
// SHE library
-// Copyright (C) 2012-2015 David Capello
+// Copyright (C) 2012-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
@@ -9,7 +9,7 @@
#pragma once
#include "gfx/clip.h"
-#include "she/common/font.h"
+#include "she/common/sprite_sheet_font.h"
#include "she/locked_surface.h"
#include "she/scoped_surface_lock.h"
@@ -433,7 +433,7 @@ public:
}
void drawChar(Font* font, gfx::Color fg, gfx::Color bg, int x, int y, int chr) override {
- CommonFont* commonFont = static_cast<CommonFont*>(font);
+ SpriteSheetFont* commonFont = static_cast<SpriteSheetFont*>(font);
gfx::Rect charBounds = commonFont->getCharBounds(chr);
if (!charBounds.isEmpty()) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git
More information about the Pkg-games-commits
mailing list