void wxPolygonShape::SetSize(double new_width, double new_height, bool recursive)
{
SetAttachmentSize(new_width, new_height);
-
+
// Multiply all points by proportion of new size to old size
double x_proportion = (double)(fabs(new_width/m_originalWidth));
double y_proportion = (double)(fabs(new_height/m_originalHeight));
node = node->Next();
}
}
-
+
double *xpoints = new double[n];
double *ypoints = new double[n];
i ++;
}
- oglFindEndForPolyline(n, xpoints, ypoints,
+ oglFindEndForPolyline(n, xpoints, ypoints,
x1, y1, x2, y2, x3, y3);
delete[] xpoints;
if (m_shadowMode != SHADOW_NONE)
{
if (m_shadowBrush)
- dc.SetBrush(m_shadowBrush);
- dc.SetPen(g_oglTransparentPen);
+ dc.SetBrush(* m_shadowBrush);
+ dc.SetPen(* g_oglTransparentPen);
dc.DrawPolygon(n, intPoints, WXROUND(m_xpos + m_shadowOffsetX), WXROUND(m_ypos + m_shadowOffsetY));
}
if (m_pen)
{
if (m_pen->GetWidth() == 0)
- dc.SetPen(g_oglTransparentPen);
+ dc.SetPen(* g_oglTransparentPen);
else
- dc.SetPen(m_pen);
+ dc.SetPen(* m_pen);
}
if (m_brush)
- dc.SetBrush(m_brush);
+ dc.SetBrush(* m_brush);
dc.DrawPolygon(n, intPoints, WXROUND(m_xpos), WXROUND(m_ypos));
delete[] intPoints;
void wxPolygonShape::OnDrawOutline(wxDC& dc, double x, double y, double w, double h)
{
- dc.SetBrush(wxTRANSPARENT_BRUSH);
+ dc.SetBrush(* wxTRANSPARENT_BRUSH);
// Multiply all points by proportion of new size to old size
double x_proportion = (double)(fabs(w/m_originalWidth));
double y_proportion = (double)(fabs(h/m_originalHeight));
{
if (!m_points)
return FALSE;
-
+
if ((attachment >= 0) && (attachment < m_points->Number()))
return TRUE;
if (m_shadowMode != SHADOW_NONE)
{
if (m_shadowBrush)
- dc.SetBrush(m_shadowBrush);
- dc.SetPen(g_oglTransparentPen);
+ dc.SetBrush(* m_shadowBrush);
+ dc.SetPen(* g_oglTransparentPen);
if (m_cornerRadius != 0.0)
dc.DrawRoundedRectangle(WXROUND(x1 + m_shadowOffsetX), WXROUND(y1 + m_shadowOffsetY),
if (m_pen)
{
if (m_pen->GetWidth() == 0)
- dc.SetPen(g_oglTransparentPen);
+ dc.SetPen(* g_oglTransparentPen);
else
- dc.SetPen(m_pen);
+ dc.SetPen(* m_pen);
}
if (m_brush)
- dc.SetBrush(m_brush);
+ dc.SetBrush(* m_brush);
if (m_cornerRadius != 0.0)
dc.DrawRoundedRectangle(WXROUND(x1), WXROUND(y1), WXROUND(m_width), WXROUND(m_height), m_cornerRadius);
if (m_shadowMode != SHADOW_NONE)
{
if (m_shadowBrush)
- dc.SetBrush(m_shadowBrush);
- dc.SetPen(g_oglTransparentPen);
- dc.DrawEllipse((m_xpos - GetWidth()/2) + m_shadowOffsetX,
- (m_ypos - GetHeight()/2) + m_shadowOffsetY,
- GetWidth(), GetHeight());
+ dc.SetBrush(* m_shadowBrush);
+ dc.SetPen(* g_oglTransparentPen);
+ dc.DrawEllipse((long) ((m_xpos - GetWidth()/2) + m_shadowOffsetX),
+ (long) ((m_ypos - GetHeight()/2) + m_shadowOffsetY),
+ (long) GetWidth(), (long) GetHeight());
}
if (m_pen)
{
if (m_pen->GetWidth() == 0)
- dc.SetPen(g_oglTransparentPen);
+ dc.SetPen(* g_oglTransparentPen);
else
- dc.SetPen(m_pen);
+ dc.SetPen(* m_pen);
}
if (m_brush)
- dc.SetBrush(m_brush);
- dc.DrawEllipse((m_xpos - GetWidth()/2), (m_ypos - GetHeight()/2), GetWidth(), GetHeight());
+ dc.SetBrush(* m_brush);
+ dc.DrawEllipse((long) (m_xpos - GetWidth()/2), (long) (m_ypos - GetHeight()/2), (long) GetWidth(), (long) GetHeight());
}
void wxEllipseShape::SetSize(double x, double y, bool recursive)
double x2, double y2,
double *x3, double *y3)
{
- oglFindEndForCircle(m_width/2,
+ oglFindEndForCircle(m_width/2,
m_xpos, m_ypos, // Centre of circle
x2, y2, // Other end of line
x3, y3);
wxClientDC dc(GetCanvas());
GetCanvas()->PrepareDC(dc);
- dc.SetLogicalFunction(wxXOR);
+ dc.SetLogicalFunction(OGLRBLF);
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
dc.SetPen(dottedPen);
if (this->GetFixedWidth())
new_width = bound_x;
-
+
if (this->GetFixedHeight())
new_height = bound_y;
pt->sm_controlPointDragPosY = (double)(newY1 + (newHeight/2.0));
if (this->GetFixedWidth())
newWidth = bound_x;
-
+
if (this->GetFixedHeight())
newHeight = bound_y;
this->Erase(dc);
*/
- dc.SetLogicalFunction(wxXOR);
+ dc.SetLogicalFunction(OGLRBLF);
double bound_x;
double bound_y;
if (this->GetFixedWidth())
new_width = bound_x;
-
+
if (this->GetFixedHeight())
new_height = bound_y;
if (!eraseIt)
theObject->Show(TRUE);
*/
-
+
// Recursively redraw links if we have a composite.
if (theObject->GetChildren().Number() > 0)
theObject->DrawLinks(dc, -1, TRUE);
-
+
double width, height;
theObject->GetBoundingBoxMax(&width, &height);
theObject->GetEventHandler()->OnEndSize(width, height);
wxClientDC dc(GetCanvas());
GetCanvas()->PrepareDC(dc);
- dc.SetLogicalFunction(wxXOR);
+ dc.SetLogicalFunction(OGLRBLF);
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
dc.SetPen(dottedPen);
this->Erase(dc);
- dc.SetLogicalFunction(wxXOR);
+ dc.SetLogicalFunction(OGLRBLF);
double bound_x;
double bound_y;