+ CalcBoundingBox(x1, y1);
+ CalcBoundingBox(x2, y2);
+}
+
+void wxWindowDC::DoCrossHair( long x, long y )
+{
+ wxCHECK_RET( Ok(), "invalid dc" );
+
+ if (m_autoSetting)
+ SetPen (m_pen);
+
+ int xx = XLOG2DEV (x);
+ int yy = YLOG2DEV (y);
+ int ww, hh;
+ wxDisplaySize (&ww, &hh);
+ XDrawLine ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, 0, yy,
+ ww, yy);
+ XDrawLine ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, xx, 0,
+ xx, hh);
+
+ if (m_window && m_window->GetBackingPixmap())
+ {
+ xx = XLOG2DEV_2 (x);
+ yy = YLOG2DEV_2 (y);
+ XDrawLine ((Display*) m_display, (Pixmap) m_window->GetBackingPixmap(), (GC) m_gcBacking,
+ 0, yy,
+ ww, yy);
+ XDrawLine ((Display*) m_display, (Pixmap) m_window->GetBackingPixmap(), (GC) m_gcBacking,
+ xx, 0,
+ xx, hh);
+ }
+}
+
+void wxWindowDC::DoDrawArc( long x1, long y1, long x2, long y2, long xc, long yc )
+{
+ wxCHECK_RET( Ok(), "invalid dc" );
+
+ // FreeGetPixelCache();
+
+ int xx1 = XLOG2DEV (x1);
+ int yy1 = YLOG2DEV (y1);
+ int xx2 = XLOG2DEV (x2);
+ int yy2 = YLOG2DEV (y2);
+ int xxc = XLOG2DEV (xc);
+ int yyc = YLOG2DEV (yc);
+ int xxc_2 = XLOG2DEV_2 (xc);
+ int yyc_2 = YLOG2DEV_2 (yc);
+
+ long dx = xx1 - xxc;
+ long dy = yy1 - yyc;
+ double radius = sqrt (dx * dx + dy * dy);
+ long r = (long) radius;
+
+ double radius1, radius2;
+
+ if (xx1 == xx2 && yy1 == yy2)
+ {
+ radius1 = 0.0;
+ radius2 = 360.0;
+ }
+ else if (radius == 0.0)
+ radius1 = radius2 = 0.0;
+ else
+ {
+ if (xx1 - xxc == 0)
+ if (yy1 - yyc < 0)
+ radius1 = 90.0;
+ else
+ radius1 = -90.0;
+ else
+ radius1 = -atan2 ((double) (yy1 - yyc), (double) (xx1 - xxc)) * 360.0 / (2 * M_PI);
+
+ if (xx2 - xxc == 0)
+ if (yy2 - yyc < 0)
+ radius2 = 90.0;
+ else
+ radius2 = -90.0;
+ else
+ radius2 = -atan2 ((double) (yy2 - yyc), (double) (xx2 - xxc)) * 360.0 / (2 * M_PI);
+ }
+ radius1 *= 64.0;
+ radius2 *= 64.0;
+ int alpha1 = (int) radius1;
+ int alpha2 = (int) (radius2 - radius1);
+ while (alpha2 <= 0)
+ alpha2 += 360 * 64;
+ while (alpha2 > 360 * 64)
+ alpha2 -= 360 * 64;
+
+ if (m_brush.Ok() && m_brush.GetStyle () != wxTRANSPARENT)
+ {
+ SetBrush (m_brush);
+ XFillArc ((Display*) m_display, (Pixmap) m_pixmap, (GC) (GC) m_gc,
+ xxc - r, yyc - r, 2 * r, 2 * r, alpha1, alpha2);
+
+ if (m_window && m_window->GetBackingPixmap())
+ XFillArc ((Display*) m_display, (Pixmap) m_window->GetBackingPixmap(), (GC) m_gcBacking,
+ xxc_2 - r, yyc_2 - r, 2 * r, 2 * r, alpha1, alpha2);
+
+ }
+
+ if (m_pen.Ok() && m_pen.GetStyle () != wxTRANSPARENT)
+ {
+ if (m_autoSetting)
+ SetPen (m_pen);
+ XDrawArc ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc,
+ xxc - r, yyc - r, 2 * r, 2 * r, alpha1, alpha2);
+
+ if (m_window && m_window->GetBackingPixmap())
+ XDrawArc ((Display*) m_display, (Pixmap) m_window->GetBackingPixmap(), (GC) m_gcBacking,
+ xxc_2 - r, yyc_2 - r, 2 * r, 2 * r, alpha1, alpha2);
+ }
+ CalcBoundingBox (x1, y1);
+ CalcBoundingBox (x2, y2);
+}
+
+void wxWindowDC::DoDrawEllipticArc( long x, long y, long width, long height, double sa, double ea )
+{
+ wxCHECK_RET( Ok(), "invalid dc" );
+
+ int xd, yd, wd, hd;
+
+ xd = XLOG2DEV(x);
+ yd = YLOG2DEV(y);
+ wd = XLOG2DEVREL(width);
+ hd = YLOG2DEVREL(height);
+
+ if (sa>=360 || sa<=-360) sa=sa-int(sa/360)*360;
+ if (ea>=360 || ea<=-360) ea=ea-int(ea/360)*360;
+ int start = int(sa*64);
+ int end = int(ea*64);
+ if (start<0) start+=360*64;
+ if (end <0) end +=360*64;
+ if (end>start) end-=start;
+ else end+=360*64-start;
+
+ if (m_brush.Ok() && m_brush.GetStyle () != wxTRANSPARENT)
+ {
+ m_autoSetting = TRUE; // must be reset
+
+ SetBrush (m_brush);
+ XFillArc ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, xd, yd, wd, hd, start, end);
+
+ if (m_window && m_window->GetBackingPixmap())
+ XFillArc ((Display*) m_display, (Pixmap) m_window->GetBackingPixmap(), (GC) m_gcBacking,
+ XLOG2DEV_2 (x), YLOG2DEV_2 (y),wd,hd,start,end);
+ }
+
+ if (m_pen.Ok() && m_pen.GetStyle () != wxTRANSPARENT)
+ {
+ if (m_autoSetting)
+ SetPen (m_pen);
+ XDrawArc ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, xd, yd, wd, hd, start,end);
+ if (m_window && m_window->GetBackingPixmap())
+ XDrawArc ((Display*) m_display, (Pixmap) m_window->GetBackingPixmap(), (GC) m_gcBacking,
+ XLOG2DEV_2 (x), YLOG2DEV_2 (y),wd,hd,start,end);
+ }
+ CalcBoundingBox (x, y);
+ CalcBoundingBox (x + width, y + height);
+}
+
+void wxWindowDC::DoDrawPoint( long x, long y )
+{
+ wxCHECK_RET( Ok(), "invalid dc" );
+
+ // FreeGetPixelCache();
+
+ if (m_pen.Ok() && m_autoSetting)
+ SetPen (m_pen);
+
+ XDrawPoint ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, XLOG2DEV (x), YLOG2DEV (y));
+ if (m_window && m_window->GetBackingPixmap())
+ XDrawPoint ((Display*) m_display, (Pixmap) m_window->GetBackingPixmap(),(GC) m_gcBacking, XLOG2DEV_2 (x), YLOG2DEV_2 (y));
+
+ CalcBoundingBox (x, y);
+}
+
+void wxWindowDC::DoDrawLines( int n, wxPoint points[], long xoffset, long yoffset )
+{
+ wxCHECK_RET( Ok(), "invalid dc" );
+
+ // FreeGetPixelCache();
+
+ if (m_pen.Ok() && m_pen.GetStyle () != wxTRANSPARENT)
+ {
+ if (m_autoSetting)
+ SetPen (m_pen);
+
+ XPoint *xpoints = new XPoint[n];
+ int i;
+
+ for (i = 0; i < n; i++)
+ {
+ xpoints[i].x = XLOG2DEV (points[i].x + xoffset);
+ xpoints[i].y = YLOG2DEV (points[i].y + yoffset);
+ }
+ XDrawLines ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, xpoints, n, 0);
+
+ if (m_window && m_window->GetBackingPixmap())
+ {
+ for (i = 0; i < n; i++)
+ {
+ xpoints[i].x = XLOG2DEV_2 (points[i].x + xoffset);
+ xpoints[i].y = YLOG2DEV_2 (points[i].y + yoffset);
+ }
+ XDrawLines ((Display*) m_display, (Pixmap) m_window->GetBackingPixmap(),(GC) m_gcBacking, xpoints, n, 0);
+ }
+ delete[]xpoints;
+ }
+}
+
+void wxWindowDC::DoDrawPolygon( int n, wxPoint points[],
+ long xoffset, long yoffset, int fillStyle )
+{
+ wxCHECK_RET( Ok(), "invalid dc" );
+
+ // FreeGetPixelCache();
+
+ XPoint *xpoints1 = new XPoint[n + 1];
+ XPoint *xpoints2 = new XPoint[n + 1];
+ int i;
+ for (i = 0; i < n; i++)
+ {
+ xpoints1[i].x = XLOG2DEV (points[i].x + xoffset);
+ xpoints1[i].y = YLOG2DEV (points[i].y + yoffset);
+ xpoints2[i].x = XLOG2DEV_2 (points[i].x + xoffset);
+ xpoints2[i].y = YLOG2DEV_2 (points[i].y + yoffset);
+ CalcBoundingBox (points[i].x + xoffset, points[i].y + yoffset);
+ }
+
+ // Close figure for XDrawLines (not needed for XFillPolygon)
+ xpoints1[i].x = xpoints1[0].x;
+ xpoints1[i].y = xpoints1[0].y;
+ xpoints2[i].x = xpoints2[0].x;
+ xpoints2[i].y = xpoints2[0].y;
+
+ if (m_brush.Ok() && m_brush.GetStyle () != wxTRANSPARENT)
+ {
+ SetBrush (m_brush);
+ XSetFillRule ((Display*) m_display, (GC) m_gc, fillStyle == wxODDEVEN_RULE ? EvenOddRule : WindingRule);
+ XFillPolygon ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, xpoints1, n, Complex, 0);
+ XSetFillRule ((Display*) m_display, (GC) m_gc, EvenOddRule); // default mode
+ if (m_window && m_window->GetBackingPixmap())
+ {
+ XSetFillRule ((Display*) m_display,(GC) m_gcBacking,
+ fillStyle == wxODDEVEN_RULE ? EvenOddRule : WindingRule);
+ XFillPolygon ((Display*) m_display, (Pixmap) m_window->GetBackingPixmap(),(GC) m_gcBacking, xpoints2, n, Complex, 0);
+ XSetFillRule ((Display*) m_display,(GC) m_gcBacking, EvenOddRule); // default mode
+ }
+ }
+
+ if (m_pen.Ok() && m_pen.GetStyle () != wxTRANSPARENT)
+ {
+ if (m_autoSetting)
+ SetPen (m_pen);
+ XDrawLines ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, xpoints1, n + 1, 0);
+
+ if (m_window && m_window->GetBackingPixmap())
+ XDrawLines ((Display*) m_display, (Pixmap) m_window->GetBackingPixmap(),(GC) m_gcBacking, xpoints2, n + 1, 0);
+ }
+
+ delete[]xpoints1;
+ delete[]xpoints2;
+}
+
+void wxWindowDC::DoDrawRectangle( long x, long y, long width, long height )
+{
+ wxCHECK_RET( Ok(), "invalid dc" );
+
+ // FreeGetPixelCache();
+
+ int xd, yd, wfd, hfd, wd, hd;
+
+ xd = XLOG2DEV(x);
+ yd = YLOG2DEV(y);
+ wfd = XLOG2DEVREL(width);
+ wd = wfd - WX_GC_CF;
+ hfd = YLOG2DEVREL(height);
+ hd = hfd - WX_GC_CF;
+
+ if (wfd == 0 || hfd == 0) return;
+ if (wd < 0) { wd = - wd; xd = xd - wd; }
+ if (hd < 0) { hd = - hd; yd = yd - hd; }
+
+ if (m_brush.Ok() && m_brush.GetStyle () != wxTRANSPARENT)
+ {
+ SetBrush (m_brush);
+ XFillRectangle ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, xd, yd, wfd, hfd);
+
+ if (m_window && m_window->GetBackingPixmap())
+ XFillRectangle ((Display*) m_display, (Pixmap) m_window->GetBackingPixmap(),(GC) m_gcBacking,
+ XLOG2DEV_2 (x), YLOG2DEV_2 (y),
+ wfd, hfd);
+ }
+
+ if (m_pen.Ok() && m_pen.GetStyle () != wxTRANSPARENT)
+ {
+ if (m_autoSetting)
+ SetPen (m_pen);
+ XDrawRectangle ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, xd, yd, wd, hd);
+
+ if (m_window && m_window->GetBackingPixmap())
+ XDrawRectangle ((Display*) m_display, (Pixmap) m_window->GetBackingPixmap(),(GC) m_gcBacking,
+ XLOG2DEV_2 (x), YLOG2DEV_2 (y),
+ wd, hd);
+ }
+ CalcBoundingBox (x, y);
+ CalcBoundingBox (x + width, y + height);
+}
+
+void wxWindowDC::DoDrawRoundedRectangle( long x, long y, long width, long height, double radius )
+{
+ wxCHECK_RET( Ok(), "invalid dc" );
+
+ // FreeGetPixelCache();
+
+ // If radius is negative, it's a proportion of the smaller dimension.
+
+ if (radius < 0.0) radius = - radius * ((width < height) ? width : height);
+
+ int xd = XLOG2DEV (x);
+ int yd = YLOG2DEV (y);
+ int rd = XLOG2DEVREL ((long) radius);
+ int wd = XLOG2DEVREL (width) - WX_GC_CF;
+ int hd = YLOG2DEVREL (height) - WX_GC_CF;
+
+ int rw_d = rd * 2;
+ int rh_d = rw_d;
+
+ // If radius is zero use DrawRectangle() instead to avoid
+ // X drawing errors with small radii
+ if (rd == 0)
+ {
+ DrawRectangle( x, y, width, height );
+ return;
+ }
+
+ // Draw nothing if transformed w or h is 0
+ if (wd == 0 || hd == 0) return;
+
+ // CMB: adjust size if outline is drawn otherwise the result is
+ // 1 pixel too wide and high
+ if (m_pen.GetStyle() != wxTRANSPARENT)
+ {
+ wd--;
+ hd--;
+ }
+
+ // CMB: ensure dd is not larger than rectangle otherwise we
+ // get an hour glass shape
+ if (rw_d > wd) rw_d = wd;
+ if (rw_d > hd) rw_d = hd;
+ rd = rw_d / 2;
+
+ // For backing pixmap
+ int xd2 = XLOG2DEV_2 (x);
+ int yd2 = YLOG2DEV_2 (y);
+ int rd2 = XLOG2DEVREL ((long) radius);
+ int wd2 = XLOG2DEVREL (width) ;
+ int hd2 = YLOG2DEVREL (height) ;
+
+ int rw_d2 = rd2 * 2;
+ int rh_d2 = rw_d2;
+
+ if (m_brush.Ok() && m_brush.GetStyle () != wxTRANSPARENT)
+ {
+ SetBrush (m_brush);
+
+ XFillRectangle ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, xd + rd, yd,
+ wd - rw_d, hd);
+ XFillRectangle ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, xd, yd + rd,
+ wd, hd - rh_d);
+
+ // Arcs start from 3 o'clock, positive angles anticlockwise
+ // Top-left
+ XFillArc ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, xd, yd,
+ rw_d, rh_d, 90 * 64, 90 * 64);
+ // Top-right
+ XFillArc ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, xd + wd - rw_d, yd,
+ // rw_d, rh_d, 0, 90 * 64);
+ rw_d, rh_d, 0, 91 * 64);
+ // Bottom-right
+ XFillArc ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, xd + wd - rw_d,
+ yd + hd - rh_d,
+ // rw_d, rh_d, 270 * 64, 90 * 64);
+ rw_d, rh_d, 269 * 64, 92 * 64);
+ // Bottom-left
+ XFillArc ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, xd, yd + hd - rh_d,
+ rw_d, rh_d, 180 * 64, 90 * 64);
+
+ if (m_window && m_window->GetBackingPixmap())
+ {
+ XFillRectangle ((Display*) m_display, (Pixmap) m_window->GetBackingPixmap(),(GC) m_gcBacking,
+ xd2 + rd2, yd2, wd2 - rw_d2, hd2);
+ XFillRectangle ((Display*) m_display, (Pixmap) m_window->GetBackingPixmap(),(GC) m_gcBacking,
+ xd2, yd2 + rd2, wd2, hd2 - rh_d2);
+
+ XFillArc ((Display*) m_display, (Pixmap) m_window->GetBackingPixmap(),(GC) m_gcBacking,
+ xd2, yd2, rw_d2, rh_d2, 90 * 64, 90 * 64);
+ XFillArc ((Display*) m_display, (Pixmap) m_window->GetBackingPixmap(),(GC) m_gcBacking,
+ xd2 + wd2 - rw_d2, yd2,
+ // rw_d2, rh_d2, 0, 90 * 64);
+ rw_d2, rh_d2, 0, 91 * 64);
+ XFillArc ((Display*) m_display, (Pixmap) m_window->GetBackingPixmap(),(GC) m_gcBacking,
+ xd2 + wd2 - rw_d2,
+ yd2 + hd2 - rh_d2,
+ // rw_d2, rh_d2, 270 * 64, 90 * 64);
+ rw_d2, rh_d2, 269 * 64, 92 * 64);
+ XFillArc ((Display*) m_display, (Pixmap) m_window->GetBackingPixmap(),(GC) m_gcBacking,
+ xd2, yd2 + hd2 - rh_d2,
+ rw_d2, rh_d2, 180 * 64, 90 * 64);
+ }
+ }
+
+ if (m_pen.Ok() && m_pen.GetStyle () != wxTRANSPARENT)
+ {
+ SetPen (m_pen);
+ XDrawLine ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, xd + rd, yd,
+ xd + wd - rd + 1, yd);
+ XDrawLine ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, xd + rd, yd + hd,
+ xd + wd - rd, yd + hd);
+
+ XDrawLine ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, xd, yd + rd,
+ xd, yd + hd - rd);
+ XDrawLine ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, xd + wd, yd + rd,
+ xd + wd, yd + hd - rd + 1);
+ XDrawArc ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, xd, yd,
+ rw_d, rh_d, 90 * 64, 90 * 64);
+ XDrawArc ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, xd + wd - rw_d, yd,
+ // rw_d, rh_d, 0, 90 * 64);
+ rw_d, rh_d, 0, 91 * 64);
+ XDrawArc ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, xd + wd - rw_d,
+ yd + hd - rh_d,
+ rw_d, rh_d, 269 * 64, 92 * 64);
+ XDrawArc ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, xd, yd + hd - rh_d,
+ rw_d, rh_d, 180 * 64, 90 * 64);
+
+ if (m_window && m_window->GetBackingPixmap())
+ {
+ XDrawLine ((Display*) m_display, (Pixmap) m_window->GetBackingPixmap(),(GC) m_gcBacking,
+ xd2 + rd2, yd2,
+ xd2 + wd2 - rd2 + 1, yd2);
+ XDrawLine ((Display*) m_display, (Pixmap) m_window->GetBackingPixmap(),(GC) m_gcBacking,
+ xd2 + rd2, yd2 + hd2,
+ xd2 + wd2 - rd2, yd2 + hd2);
+
+ XDrawLine ((Display*) m_display, (Pixmap) m_window->GetBackingPixmap(),(GC) m_gcBacking,
+ xd2, yd2 + rd2,
+ xd2, yd2 + hd2 - rd2);
+ XDrawLine ((Display*) m_display, (Pixmap) m_window->GetBackingPixmap(),(GC) m_gcBacking,
+ xd2 + wd2, yd2 + rd2,
+ xd2 + wd2, yd2 + hd2 - rd2 + 1);
+ XDrawArc ((Display*) m_display, (Pixmap) m_window->GetBackingPixmap(),(GC) m_gcBacking,
+ xd2, yd2,
+ rw_d2, rh_d2, 90 * 64, 90 * 64);
+ XDrawArc ((Display*) m_display, (Pixmap) m_window->GetBackingPixmap(),(GC) m_gcBacking,
+ xd2 + wd2 - rw_d2, yd2,
+ // rw_d2, rh_d2, 0, 90 * 64);
+ rw_d2, rh_d2, 0, 91 * 64);
+ XDrawArc ((Display*) m_display, (Pixmap) m_window->GetBackingPixmap(),(GC) m_gcBacking,
+ xd2 + wd2 - rw_d2,
+ yd2 + hd2 - rh_d2,
+ rw_d2, rh_d2, 269 * 64, 92 * 64);
+ XDrawArc ((Display*) m_display, (Pixmap) m_window->GetBackingPixmap(),(GC) m_gcBacking,
+ xd2, yd2 + hd2 - rh_d2,
+ rw_d2, rh_d2, 180 * 64, 90 * 64);
+ }
+ }
+ CalcBoundingBox (x, y);
+ CalcBoundingBox (x + width, y + height);
+
+
+}
+
+void wxWindowDC::DoDrawEllipse( long x, long y, long width, long height )
+{
+ wxCHECK_RET( Ok(), "invalid dc" );
+
+ // Check for negative width and height
+ if (height < 0)
+ {
+ y = y + height;
+ height = - height ;
+ }
+
+ if (width < 0)
+ {
+ x = x + width;
+ width = - width ;
+ }
+
+ // FreeGetPixelCache();
+
+ static const int angle = 23040;
+
+ int xd, yd, wd, hd;
+
+ xd = XLOG2DEV(x);
+ yd = YLOG2DEV(y);
+ wd = XLOG2DEVREL(width) ;
+ hd = YLOG2DEVREL(height) ;
+
+ if (m_brush.Ok() && m_brush.GetStyle () != wxTRANSPARENT)
+ {
+ SetBrush (m_brush);
+ XFillArc ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, xd, yd, wd, hd, 0, angle);
+ if (m_window && m_window->GetBackingPixmap())
+ XFillArc ((Display*) m_display, (Pixmap) m_window->GetBackingPixmap(),(GC) m_gcBacking,
+ XLOG2DEV_2 (x), YLOG2DEV_2 (y),
+ XLOG2DEVREL (width) - WX_GC_CF,
+ YLOG2DEVREL (height) - WX_GC_CF, 0, angle);
+ }
+
+ if (m_pen.Ok() && m_pen.GetStyle () != wxTRANSPARENT)
+ {
+ if (m_autoSetting)
+ SetPen (m_pen);
+ XDrawArc ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, xd, yd, wd, hd, 0, angle);
+ if (m_window && m_window->GetBackingPixmap())
+ XDrawArc ((Display*) m_display, (Pixmap) m_window->GetBackingPixmap(),(GC) m_gcBacking,
+ XLOG2DEV_2 (x), YLOG2DEV_2 (y),
+ XLOG2DEVREL (width) - WX_GC_CF,
+ YLOG2DEVREL (height) - WX_GC_CF, 0, angle);
+ }
+ CalcBoundingBox (x, y);
+ CalcBoundingBox (x + width, y + height);