25 #ifndef JUCE_MAC_COREGRAPHICSHELPERS_H_INCLUDED
26 #define JUCE_MAC_COREGRAPHICSHELPERS_H_INCLUDED
32 template <
class RectType>
35 return Rectangle<int> ((
int) r.origin.x, (
int) r.origin.y, (
int) r.size.width, (
int) r.size.height);
38 template <
class RectType>
41 return Rectangle<float> (r.origin.x, r.origin.y, r.size.width, r.size.height);
44 template <
class RectType>
45 CGRect convertToCGRect (RectType r)
noexcept
47 return CGRectMake ((CGFloat) r.getX(), (CGFloat) r.getY(), (CGFloat) r.getWidth(), (CGFloat) r.getHeight());
50 template <
typename Po
intType>
51 CGPoint convertToCGPoint (PointType p)
noexcept
53 return CGPointMake ((CGFloat) p.x, (CGFloat) p.y);
60 #endif // JUCE_MAC_COREGRAPHICSHELPERS_H_INCLUDED