[Scummvm-git-logs] scummvm master -> 2d64cba73a057316e103e2408398712c5b3d790e
criezy
criezy at scummvm.org
Wed Nov 4 22:26:35 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
2d64cba73a GRAPHICS: Remove unused function
Commit: 2d64cba73a057316e103e2408398712c5b3d790e
https://github.com/scummvm/scummvm/commit/2d64cba73a057316e103e2408398712c5b3d790e
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2020-11-04T22:25:43Z
Commit Message:
GRAPHICS: Remove unused function
This was a left over from GUI conversion to U32String.
Changed paths:
graphics/VectorRenderer.h
graphics/VectorRendererSpec.cpp
graphics/VectorRendererSpec.h
diff --git a/graphics/VectorRenderer.h b/graphics/VectorRenderer.h
index 0efa199926..240e601acb 100644
--- a/graphics/VectorRenderer.h
+++ b/graphics/VectorRenderer.h
@@ -526,9 +526,6 @@ public:
* Draws a string into the screen. Wrapper for the Graphics::Font string drawing
* method.
*/
- virtual void drawString(const Graphics::Font *font, const Common::String &text,
- const Common::Rect &area, Graphics::TextAlign alignH,
- GUI::ThemeEngine::TextAlignVertical alignV, int deltax, bool useEllipsis, const Common::Rect &textDrawableArea) = 0;
virtual void drawString(const Graphics::Font *font, const Common::U32String &text,
const Common::Rect &area, Graphics::TextAlign alignH,
GUI::ThemeEngine::TextAlignVertical alignV, int deltax, bool useEllipsis, const Common::Rect &textDrawableArea) = 0;
diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp
index 814150bdc4..8e9a5f86fa 100644
--- a/graphics/VectorRendererSpec.cpp
+++ b/graphics/VectorRendererSpec.cpp
@@ -1022,59 +1022,6 @@ darkenFillClip(PixelType *ptr, PixelType *end, int x, int y) {
* Primitive shapes drawing - Public API calls - VectorRendererSpec *
********************************************************************
********************************************************************/
-template<typename PixelType>
-void VectorRendererSpec<PixelType>::
-drawString(const Graphics::Font *font, const Common::String &text, const Common::Rect &area,
- Graphics::TextAlign alignH, GUI::ThemeEngine::TextAlignVertical alignV, int deltax, bool ellipsis, const Common::Rect &textDrawableArea) {
-
- int offset = area.top;
-
- if (font->getFontHeight() < area.height()) {
- switch (alignV) {
- case GUI::ThemeEngine::kTextAlignVCenter:
- offset = area.top + ((area.height() - font->getFontHeight()) >> 1);
- break;
- case GUI::ThemeEngine::kTextAlignVBottom:
- offset = area.bottom - font->getFontHeight();
- break;
- default:
- break;
- }
- }
-
- Common::Rect drawArea;
- if (textDrawableArea.isEmpty()) {
- // In case no special area to draw to is given we only draw in the
- // area specified by the user.
- drawArea = area;
- // warning("there is no text drawable area. Please set this area for clipping");
- } else {
- // The area we can draw to is the intersection between the allowed
- // drawing area (textDrawableArea) and the area where we try to draw
- // the text (area).
- drawArea = textDrawableArea.findIntersectingRect(area);
- }
-
- // Better safe than sorry. We intersect with the actual surface boundaries
- // to avoid any ugly clipping in _activeSurface->getSubArea which messes
- // up the calculation of the x and y coordinates where to draw the string.
- drawArea = drawArea.findIntersectingRect(Common::Rect(0, 0, _activeSurface->w, _activeSurface->h));
-
- if (!drawArea.isEmpty()) {
- Common::Rect textArea(area);
- textArea.right -= deltax;
-
- Surface textAreaSurface = _activeSurface->getSubArea(drawArea);
-
- if (deltax >= 0) {
- textArea.left += deltax;
- deltax = 0;
- }
-
- font->drawString(&textAreaSurface, text, textArea.left - drawArea.left, offset - drawArea.top, textArea.width(), _fgColor, alignH, deltax, ellipsis);
- }
-}
-
template<typename PixelType>
void VectorRendererSpec<PixelType>::
drawString(const Graphics::Font *font, const Common::U32String &text, const Common::Rect &area,
diff --git a/graphics/VectorRendererSpec.h b/graphics/VectorRendererSpec.h
index 057fb1f2da..eef17b7d49 100644
--- a/graphics/VectorRendererSpec.h
+++ b/graphics/VectorRendererSpec.h
@@ -65,9 +65,6 @@ public:
drawBevelSquareAlg(x, y, w, h, _bevel, _bevelColor, _fgColor);
}
}
- void drawString(const Graphics::Font *font, const Common::String &text,
- const Common::Rect &area, Graphics::TextAlign alignH, GUI::ThemeEngine::TextAlignVertical alignV,
- int deltax, bool elipsis, const Common::Rect &textDrawableArea = Common::Rect(0, 0, 0, 0)) override;
void drawString(const Graphics::Font *font, const Common::U32String &text,
const Common::Rect &area, Graphics::TextAlign alignH, GUI::ThemeEngine::TextAlignVertical alignV,
int deltax, bool elipsis, const Common::Rect &textDrawableArea = Common::Rect(0, 0, 0, 0)) override;
More information about the Scummvm-git-logs
mailing list