29#pragma comment(lib, "gdiplus")
39template <
class TDest,
class T>
45 return Gdiplus::Size(
v.cx,
v.cy);
51 return Gdiplus::SizeF(
static_cast<Gdiplus::REAL
>(
v.cx),
static_cast<Gdiplus::REAL
>(
v.cy));
57 return Gdiplus::Point(
v.x,
v.y);
63 return Gdiplus::PointF(
static_cast<Gdiplus::REAL
>(
v.x),
static_cast<Gdiplus::REAL
>(
v.y));
69 return Gdiplus::Rect(
v.left,
v.top,
v.Width(),
v.Height());
75 return Gdiplus::RectF(
76 static_cast<Gdiplus::REAL
>(
v.left),
77 static_cast<Gdiplus::REAL
>(
v.top),
78 static_cast<Gdiplus::REAL
>(
v.Width()),
79 static_cast<Gdiplus::REAL
>(
v.Height())
103 return TSize(
v.Width,
v.Height);
108 return TSize(std::lround(
v.Width), std::lround(
v.Height));
118 return TPoint(std::lround(
v.X), std::lround(
v.Y));
129 TPoint(std::lround(
v.X), std::lround(
v.Y)),
130 TSize(std::lround(
v.Width), std::lround(
v.Height)));
139 return TColor(
v.GetRed(),
v.GetGreen(),
v.GetBlue());
153template <
class TDest,
class T>
Class wrapper for management of color values.
TPoint is a support class, derived from tagPOINT.
TRect is a mathematical class derived from tagRect.
The tagSIZE struct is defined as.
Definition of windowing system color classes.
Utilities for GDI+ interoperability.
Classes for window system geometry.
Object Windows Library (OWLNext Core)
Gdiplus::SizeF ConvertToGdiplus< Gdiplus::SizeF >(const TSize &v)
Gdiplus::SizeF gdiplus_cast< Gdiplus::SizeF >(const TSize &v)
Gdiplus::Color gdiplus_cast< Gdiplus::Color >(const TColor &v)
Gdiplus::Rect gdiplus_cast< Gdiplus::Rect >(const TRect &v)
Gdiplus::RectF ConvertToGdiplus< Gdiplus::RectF >(const TRect &v)
TDest ConvertToGdiplus(const T &)
ConvertToGdiplus template; Converts any of TSize, TPoint and TRect to its counter-part in GDI+; Gdipl...
TSize gdiplus_cast< TSize >(const Gdiplus::Size &v)
TColor gdiplus_cast< TColor >(const Gdiplus::Color &v)
Gdiplus::PointF ConvertToGdiplus< Gdiplus::PointF >(const TPoint &v)
Gdiplus::Size gdiplus_cast< Gdiplus::Size >(const TSize &v)
Gdiplus::Point gdiplus_cast< Gdiplus::Point >(const TPoint &v)
TSize ConvertFromGdiplus(const Gdiplus::Size &v)
ConvertFromGdiplus overloads; Converts any of Gdiplus::Size/SizeF, Point/PointF, Rect/RectF and Color...
Gdiplus::Rect ConvertToGdiplus< Gdiplus::Rect >(const TRect &v)
Gdiplus::RectF gdiplus_cast< Gdiplus::RectF >(const TRect &v)
Gdiplus::Size ConvertToGdiplus< Gdiplus::Size >(const TSize &v)
Gdiplus::Point ConvertToGdiplus< Gdiplus::Point >(const TPoint &v)
TDest gdiplus_cast(const T &)
gdiplus_cast template; Simulates a cast operator that can convert to and from any of OWLNext types TS...
Gdiplus::PointF gdiplus_cast< Gdiplus::PointF >(const TPoint &v)
TPoint gdiplus_cast< TPoint >(const Gdiplus::Point &v)
TRect gdiplus_cast< TRect >(const Gdiplus::Rect &v)