// returns TRUE for pixels in the color of the current pen
// and FALSE for all other pixels colors
// if col is non-NULL return the color of the pixel
-/*
- int xx1 = (int)x;
- int yy1 = (int)y;
- if (m_canvas)
- m_canvas->CalcScrolledPosition((int)x, (int)y, &xx1, &yy1);
-*/
// get the color of the pixel
COLORREF pixelcolor = ::GetPixel((HDC) m_hDC, XLOG2DEV(x), YLOG2DEV(y));
long y1 = y-2000;
long x2 = x+2000;
long y2 = y+2000;
-/*
- long xx1 = x1 ;
- long yy1 = y1 ;
- long xx2 = x2 ;
- long yy2 = y2 ;
- long xx = x ;
- long yy = y ;
-
- if (m_canvas)
- {
- m_canvas->CalcScrolledPosition(x1, y1, &xx1, &yy1);
- m_canvas->CalcScrolledPosition(x2, y2, &xx2, &yy2);
- m_canvas->CalcScrolledPosition(x, y, &xx, &yy);
- }
-*/
BeginDrawing();
// BUGBUG - is this necessary? YES YES YES YEs Yes yes ye....
if (m_pen.Ok() && m_autoSetting)
SetPen(m_pen);
-/*
- int xx1 = (int)x1;
- int yy1 = (int)y1;
- int xx2 = (int)x2;
- int yy2 = (int)y2;
- if (m_canvas)
- {
- m_canvas->CalcScrolledPosition((int)x1, (int)y1, &xx1, &yy1);
- m_canvas->CalcScrolledPosition((int)x2, (int)y2, &xx2, &yy2);
- }
-*/
BeginDrawing();
void wxDC::DrawArc(long x1,long y1,long x2,long y2,double xc,double yc)
{
-/*
- int xx1 = (int)x1;
- int yy1 = (int)y1;
- int xx2 = (int)x2;
- int yy2 = (int)y2;
- int xxc = (int)xc ;
- int yyc = (int)yc;
-*/
-
double dx = xc-x1 ;
double dy = yc-y1 ;
double radius = (double)sqrt(dx*dx+dy*dy) ;;
if (m_pen.Ok() && m_autoSetting)
SetPen(m_pen) ;
-/*
- if (m_canvas)
- {
- m_canvas->CalcScrolledPosition((int)x1, (int)y1, &xx1, &yy1);
- m_canvas->CalcScrolledPosition((int)x2, (int)y2, &xx2, &yy2);
- m_canvas->CalcScrolledPosition((int)xc, (int)yc, &xxc, &yyc);
- }
-*/
-
BeginDrawing();
long xx1 = XLOG2DEV(x1) ;
if (m_pen.Ok() && m_autoSetting)
SetPen(m_pen) ;
-/*
- int xx1 = (int)x;
- int yy1 = (int)y;
- if (m_canvas)
- m_canvas->CalcScrolledPosition((int)x, (int)y, &xx1, &yy1);
-*/
-
BeginDrawing();
COLORREF color = 0x00ffffff;
color = m_pen.GetColour().GetPixel() ;
}
-/*
- color = RGB(m_pen->GetColour().Red(),
- m_pen->GetColour().Green(),
- m_pen->GetColour().Blue());
-*/
-
SetPixel((HDC) m_hDC, XLOG2DEV(x), YLOG2DEV(y), color);
EndDrawing();
// BUGBUG - is this necessary?
if (m_pen.Ok() && m_autoSetting)
SetPen(m_pen) ;
-/*
- int xoffset1 = 0;
- int yoffset1 = 0;
-
- if (m_canvas)
- m_canvas->CalcScrolledPosition(0, 0, &xoffset1, &yoffset1);
-
- xoffset1 += (int)xoffset; yoffset1 += (int)yoffset;
-*/
BeginDrawing();
int i;
for (i = 0; i < n; i++)
{
- cpoints[i].x = (int)(XLOG2DEV(points[i].x));
- cpoints[i].y = (int)(YLOG2DEV(points[i].y));
+ cpoints[i].x = (int)(XLOG2DEV(points[i].x + xoffset));
+ cpoints[i].y = (int)(YLOG2DEV(points[i].y + yoffset));
- CalcBoundingBox(points[i].x, points[i].y);
+ CalcBoundingBox(points[i].x + xoffset, points[i].y + yoffset);
}
int prev = SetPolyFillMode((HDC) m_hDC,fillStyle==wxODDEVEN_RULE?ALTERNATE:WINDING) ;
if (m_pen.Ok() && m_autoSetting)
SetPen(m_pen) ;
-/*
- int xoffset1 = 0;
- int yoffset1 = 0;
-
- if (m_canvas)
- {
- m_canvas->CalcScrolledPosition(0, 0, &xoffset1, &yoffset1);
- }
- xoffset1 += (int)xoffset; yoffset1 += (int)yoffset;
-*/
-
BeginDrawing();
POINT *cpoints = new POINT[n];
int i;
for (i = 0; i < n; i++)
{
- cpoints[i].x = (int)(XLOG2DEV(points[i].x));
- cpoints[i].y = (int)(YLOG2DEV(points[i].y));
+ cpoints[i].x = (int)(XLOG2DEV(points[i].x + xoffset));
+ cpoints[i].y = (int)(YLOG2DEV(points[i].y + yoffset));
- CalcBoundingBox(points[i].x, points[i].y);
+ CalcBoundingBox(points[i].x + xoffset, points[i].y + yoffset);
}
(void)Polyline((HDC) m_hDC, cpoints, n);
if (m_pen.Ok() && m_autoSetting)
SetPen(m_pen) ;
-/*
- int x1 = (int)x;
- int y1 = (int)y;
- int x2 = (int)(x+width);
- int y2 = (int)(y+height);
-
- if (m_canvas)
- {
- m_canvas->CalcScrolledPosition((int)x, (int)y, &x1, &y1);
- m_canvas->CalcScrolledPosition((int)(x+width), (int)(y+height), &x2, &y2);
- }
-*/
long x2 = x + width;
long y2 = y + height;
radius = (- radius * smallest);
}
-/*
- int x1 = (int)x;
- int y1 = (int)y;
-
- if (m_canvas)
- {
- m_canvas->CalcScrolledPosition((int)x, (int)y, &x1, &y1);
- m_canvas->CalcScrolledPosition((int)(x+width), (int)(y+height), &x2, &y2);
- }
-*/
-
long x2 = (x+width);
long y2 = (y+height);
if (m_pen.Ok() && m_autoSetting)
SetPen(m_pen) ;
-/*
- int x1 = (int)x;
- int y1 = (int)y;
-
- if (m_canvas)
- {
- m_canvas->CalcScrolledPosition((int)x, (int)y, &x1, &y1);
- m_canvas->CalcScrolledPosition((int)(x+width), (int)(y+height), &x2, &y2);
- }
-*/
-
long x2 = (x+width);
long y2 = (y+height);
void wxDC::DrawIcon(const wxIcon& icon, long x, long y)
{
-/*
- int x1 = (int)x;
- int y1 = (int)y;
-
- if (m_canvas)
- m_canvas->CalcScrolledPosition(int)x, (int)y, &x1, &y1);
-*/
-
BeginDrawing();
::DrawIcon((HDC) m_hDC, XLOG2DEV(x), YLOG2DEV(y), (HICON) icon.GetHICON());
void wxDC::DrawText(const wxString& text, long x, long y, bool use16bit)
{
-/*
- int xx1 = (int)x;
- int yy1 = (int)y;
-
- if (m_canvas)
- m_canvas->CalcScrolledPosition((int)x, (int)y, &xx1, &yy1);
-*/
-
BeginDrawing();
if (m_font.Ok() && m_font.GetResourceHandle())