mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 21:06:59 -04:00
Remove AColor class, because wxColour now supports alpha values.
This commit is contained in:
@@ -26,7 +26,6 @@ template <> void GetDefaultMember::handle(const bool& v) { value = to_sc
|
||||
template <> void GetDefaultMember::handle(const tribool& v) { value = to_script((bool)v); }
|
||||
template <> void GetDefaultMember::handle(const Vector2D& v) { value = to_script(String::Format(_("(%.10lf,%.10lf)"), v.x, v.y)); }
|
||||
template <> void GetDefaultMember::handle(const Color& v) { value = to_script(v); }
|
||||
template <> void GetDefaultMember::handle(const AColor& v) { value = to_script(v); }
|
||||
template <> void GetDefaultMember::handle(const wxDateTime& v) { value = to_script(v); }
|
||||
void GetDefaultMember::handle(const ScriptValueP& v) { value = v; }
|
||||
void GetDefaultMember::handle(const ScriptP& v) { value = v; }
|
||||
|
||||
@@ -130,9 +130,6 @@ template <> void Writer::handle(const wxDateTime& date) {
|
||||
template <> void Writer::handle(const Vector2D& vec) {
|
||||
handle(String::Format(_("(%.10lf,%.10lf)"), vec.x, vec.y));
|
||||
}
|
||||
template <> void Writer::handle(const Color& col) {
|
||||
handle(String::Format(_("rgb(%u,%u,%u)"), col.Red(), col.Green(), col.Blue()));
|
||||
}
|
||||
|
||||
template <> void Writer::handle(const FileName& value) {
|
||||
if (clipboard_package() && !value.empty()) {
|
||||
|
||||
@@ -186,9 +186,9 @@ void RotatedDC::DrawText (const String& text, const RealPoint& pos, int blur_ra
|
||||
DrawText(text, pos, dc.GetTextForeground(), blur_radius, boldness, stretch_);
|
||||
}
|
||||
|
||||
void RotatedDC::DrawText (const String& text, const RealPoint& pos, AColor color, int blur_radius, int boldness, double stretch_) {
|
||||
void RotatedDC::DrawText (const String& text, const RealPoint& pos, Color color, int blur_radius, int boldness, double stretch_) {
|
||||
if (text.empty()) return;
|
||||
if (color.alpha == 0) return;
|
||||
if (color.Alpha() == 0) return;
|
||||
if (quality >= QUALITY_AA) {
|
||||
RealRect r(pos, GetTextExtent(text));
|
||||
RealRect r_ext = trRectToBB(r);
|
||||
|
||||
@@ -158,8 +158,8 @@ class RotatedDC : public Rotation {
|
||||
// --------------------------------------------------- : Drawing
|
||||
|
||||
/// Draw text
|
||||
void DrawText (const String& text, const RealPoint& pos, int blur_radius = 0, int boldness = 1, double stretch = 1.0);
|
||||
void DrawText (const String& text, const RealPoint& pos, AColor color, int blur_radius = 0, int boldness = 1, double stretch = 1.0);
|
||||
void DrawText (const String& text, const RealPoint& pos, int blur_radius = 0, int boldness = 1, double stretch = 1.0);
|
||||
void DrawText (const String& text, const RealPoint& pos, Color color, int blur_radius = 0, int boldness = 1, double stretch = 1.0);
|
||||
/// Draw text with the shadow and color settings of the given font
|
||||
void DrawTextWithShadow(const String& text, const Font& font, const RealPoint& pos, double scale = 1.0, double stretch = 1.0);
|
||||
/// Draw abitmap, it must already be zoomed!
|
||||
|
||||
Reference in New Issue
Block a user