mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 21:06:59 -04:00
rename Font to FontRef
for consistency with SymbolFontRef
This commit is contained in:
@@ -218,7 +218,7 @@ void RotatedDC::DrawText(const String& text, const RealPoint& pos, Color color,
|
||||
}
|
||||
}
|
||||
|
||||
void RotatedDC::DrawTextWithShadowOrStroke(const String& text, const Font& font, const RealPoint& pos, double scale, double stretch) {
|
||||
void RotatedDC::DrawTextWithShadowOrStroke(const String& text, const FontRef& font, const RealPoint& pos, double scale, double stretch) {
|
||||
double s_scale = scale * dc.GetFont().GetPointSize() / text_scaling / 15.;
|
||||
if (font.hasShadow() && !font.hasStroke()) {
|
||||
RealSize shadow_displacement = trInvS(RealSize(font.shadow_displacement_x, font.shadow_displacement_y) * s_scale);
|
||||
@@ -326,7 +326,7 @@ void RotatedDC::SetFont(const wxFont& font) {
|
||||
dc.SetFont(scaled);
|
||||
}
|
||||
}
|
||||
void RotatedDC::SetFont(const Font& font, double scale) {
|
||||
void RotatedDC::SetFont(const FontRef& font, double scale) {
|
||||
dc.SetFont(font.toWxFont(trS(scale) * (quality == QUALITY_LOW ? 1 : text_scaling)));
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <util/real_point.hpp>
|
||||
#include <gfx/gfx.hpp>
|
||||
|
||||
class Font;
|
||||
class FontRef;
|
||||
|
||||
// ----------------------------------------------------------------------------- : Rotation
|
||||
|
||||
@@ -160,7 +160,7 @@ public:
|
||||
void DrawText (const String& text, const RealPoint& pos, int blur_radius = 0, Color stroke_color = Color(0,0,0), int stroke_radius = 0, double stretch = 1.0);
|
||||
void DrawText (const String& text, const RealPoint& pos, Color color, int blur_radius = 0, Color stroke_color = Color(0,0,0), int stroke_radius = 0, double stretch = 1.0);
|
||||
/// Draw text with a shadow or stroke, and color settings of the given font
|
||||
void DrawTextWithShadowOrStroke(const String& text, const Font& font, const RealPoint& pos, double scale = 1.0, double stretch = 1.0);
|
||||
void DrawTextWithShadowOrStroke(const String& text, const FontRef& font, const RealPoint& pos, double scale = 1.0, double stretch = 1.0);
|
||||
/// Draw abitmap, it must already be zoomed!
|
||||
void DrawBitmap(const Bitmap& bitmap, const RealPoint& pos);
|
||||
/// Draw an image using the given combining mode, the image must already be zoomed!
|
||||
@@ -194,7 +194,7 @@ public:
|
||||
void SetFont(const wxFont& font);
|
||||
/// Set the font, scales for zoom and high_quality
|
||||
/** The font size will be multiplied by 'scale' */
|
||||
void SetFont(const Font& font, double scale);
|
||||
void SetFont(const FontRef& font, double scale);
|
||||
/// Steps to use when decrementing font size
|
||||
double getFontSizeStep() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user