Usage of common default colours in OGL + minor warning fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -499,7 +499,7 @@ void MyEvtHandler::OnBeginDragRight(double x, double y, int WXUNUSED(keys), int
|
|||||||
wxClientDC dc(GetShape()->GetCanvas());
|
wxClientDC dc(GetShape()->GetCanvas());
|
||||||
GetShape()->GetCanvas()->PrepareDC(dc);
|
GetShape()->GetCanvas()->PrepareDC(dc);
|
||||||
|
|
||||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
wxPen dottedPen(*wxBLACK, 1, wxDOT);
|
||||||
dc.SetLogicalFunction(OGLRBLF);
|
dc.SetLogicalFunction(OGLRBLF);
|
||||||
dc.SetPen(dottedPen);
|
dc.SetPen(dottedPen);
|
||||||
double xp, yp;
|
double xp, yp;
|
||||||
@@ -516,7 +516,7 @@ void MyEvtHandler::OnDragRight(bool WXUNUSED(draw), double x, double y, int WXUN
|
|||||||
wxClientDC dc(GetShape()->GetCanvas());
|
wxClientDC dc(GetShape()->GetCanvas());
|
||||||
GetShape()->GetCanvas()->PrepareDC(dc);
|
GetShape()->GetCanvas()->PrepareDC(dc);
|
||||||
|
|
||||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
wxPen dottedPen(*wxBLACK, 1, wxDOT);
|
||||||
dc.SetLogicalFunction(OGLRBLF);
|
dc.SetLogicalFunction(OGLRBLF);
|
||||||
dc.SetPen(dottedPen);
|
dc.SetPen(dottedPen);
|
||||||
double xp, yp;
|
double xp, yp;
|
||||||
|
@@ -196,7 +196,7 @@ void csEvtHandler::OnBeginDragRight(double x, double y, int WXUNUSED(keys), int
|
|||||||
wxClientDC dc(GetShape()->GetCanvas());
|
wxClientDC dc(GetShape()->GetCanvas());
|
||||||
GetShape()->GetCanvas()->PrepareDC(dc);
|
GetShape()->GetCanvas()->PrepareDC(dc);
|
||||||
|
|
||||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
wxPen dottedPen(*wxBLACK, 1, wxDOT);
|
||||||
dc.SetLogicalFunction(OGLRBLF);
|
dc.SetLogicalFunction(OGLRBLF);
|
||||||
dc.SetPen(dottedPen);
|
dc.SetPen(dottedPen);
|
||||||
double xp, yp;
|
double xp, yp;
|
||||||
@@ -210,7 +210,7 @@ void csEvtHandler::OnDragRight(bool WXUNUSED(draw), double x, double y, int WXUN
|
|||||||
wxClientDC dc(GetShape()->GetCanvas());
|
wxClientDC dc(GetShape()->GetCanvas());
|
||||||
GetShape()->GetCanvas()->PrepareDC(dc);
|
GetShape()->GetCanvas()->PrepareDC(dc);
|
||||||
|
|
||||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
wxPen dottedPen(*wxBLACK, 1, wxDOT);
|
||||||
dc.SetLogicalFunction(OGLRBLF);
|
dc.SetLogicalFunction(OGLRBLF);
|
||||||
dc.SetPen(dottedPen);
|
dc.SetPen(dottedPen);
|
||||||
double xp, yp;
|
double xp, yp;
|
||||||
@@ -282,7 +282,7 @@ void csEvtHandler::OnDragLeft(bool draw, double x, double y, int keys, int attac
|
|||||||
|
|
||||||
dc.SetLogicalFunction(OGLRBLF);
|
dc.SetLogicalFunction(OGLRBLF);
|
||||||
|
|
||||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
wxPen dottedPen(*wxBLACK, 1, wxDOT);
|
||||||
dc.SetPen(dottedPen);
|
dc.SetPen(dottedPen);
|
||||||
dc.SetBrush(* wxTRANSPARENT_BRUSH);
|
dc.SetBrush(* wxTRANSPARENT_BRUSH);
|
||||||
|
|
||||||
@@ -351,7 +351,7 @@ void csEvtHandler::OnBeginDragLeft(double x, double y, int keys, int attachment)
|
|||||||
|
|
||||||
dc.SetLogicalFunction(OGLRBLF);
|
dc.SetLogicalFunction(OGLRBLF);
|
||||||
|
|
||||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
wxPen dottedPen(*wxBLACK, 1, wxDOT);
|
||||||
dc.SetPen(dottedPen);
|
dc.SetPen(dottedPen);
|
||||||
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
||||||
|
|
||||||
|
@@ -853,7 +853,7 @@ csCanvas::~csCanvas(void)
|
|||||||
|
|
||||||
void csCanvas::DrawOutline(wxDC& dc, double x1, double y1, double x2, double y2)
|
void csCanvas::DrawOutline(wxDC& dc, double x1, double y1, double x2, double y2)
|
||||||
{
|
{
|
||||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
wxPen dottedPen(*wxBLACK, 1, wxDOT);
|
||||||
dc.SetPen(dottedPen);
|
dc.SetPen(dottedPen);
|
||||||
dc.SetBrush(* wxTRANSPARENT_BRUSH);
|
dc.SetBrush(* wxTRANSPARENT_BRUSH);
|
||||||
|
|
||||||
|
@@ -1312,7 +1312,7 @@ void wxShape::OnDragLeft(bool draw, double x, double y, int keys, int attachment
|
|||||||
|
|
||||||
dc.SetLogicalFunction(OGLRBLF);
|
dc.SetLogicalFunction(OGLRBLF);
|
||||||
|
|
||||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
wxPen dottedPen(*wxBLACK, 1, wxDOT);
|
||||||
dc.SetPen(dottedPen);
|
dc.SetPen(dottedPen);
|
||||||
dc.SetBrush(* wxTRANSPARENT_BRUSH);
|
dc.SetBrush(* wxTRANSPARENT_BRUSH);
|
||||||
|
|
||||||
@@ -1357,7 +1357,7 @@ void wxShape::OnBeginDragLeft(double x, double y, int keys, int attachment)
|
|||||||
// m_xpos = xx; m_ypos = yy;
|
// m_xpos = xx; m_ypos = yy;
|
||||||
dc.SetLogicalFunction(OGLRBLF);
|
dc.SetLogicalFunction(OGLRBLF);
|
||||||
|
|
||||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
wxPen dottedPen(*wxBLACK, 1, wxDOT);
|
||||||
dc.SetPen(dottedPen);
|
dc.SetPen(dottedPen);
|
||||||
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
||||||
|
|
||||||
@@ -2711,7 +2711,9 @@ bool wxShape::GetAttachmentPosition(int attachment, double *x, double *y,
|
|||||||
double left = (double)(m_xpos - w/2.0);
|
double left = (double)(m_xpos - w/2.0);
|
||||||
double right = (double)(m_xpos + w/2.0);
|
double right = (double)(m_xpos + w/2.0);
|
||||||
|
|
||||||
|
#if 0
|
||||||
/* bool isEnd = */ (line && line->IsEnd(this));
|
/* bool isEnd = */ (line && line->IsEnd(this));
|
||||||
|
#endif
|
||||||
|
|
||||||
int physicalAttachment = LogicalToPhysicalAttachment(attachment);
|
int physicalAttachment = LogicalToPhysicalAttachment(attachment);
|
||||||
|
|
||||||
|
@@ -1298,7 +1298,7 @@ void wxShape::OnSizingDragLeft(wxControlPoint* pt, bool WXUNUSED(draw), double x
|
|||||||
|
|
||||||
dc.SetLogicalFunction(OGLRBLF);
|
dc.SetLogicalFunction(OGLRBLF);
|
||||||
|
|
||||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
wxPen dottedPen(*wxBLACK, 1, wxDOT);
|
||||||
dc.SetPen(dottedPen);
|
dc.SetPen(dottedPen);
|
||||||
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
||||||
|
|
||||||
@@ -1433,7 +1433,7 @@ void wxShape::OnSizingBeginDragLeft(wxControlPoint* pt, double x, double y, int
|
|||||||
pt->sm_controlPointDragStartWidth = bound_x;
|
pt->sm_controlPointDragStartWidth = bound_x;
|
||||||
pt->sm_controlPointDragStartHeight = bound_y;
|
pt->sm_controlPointDragStartHeight = bound_y;
|
||||||
|
|
||||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
wxPen dottedPen(*wxBLACK, 1, wxDOT);
|
||||||
dc.SetPen(dottedPen);
|
dc.SetPen(dottedPen);
|
||||||
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
||||||
|
|
||||||
@@ -1633,7 +1633,7 @@ void wxPolygonShape::OnSizingDragLeft(wxControlPoint* pt, bool WXUNUSED(draw), d
|
|||||||
|
|
||||||
dc.SetLogicalFunction(OGLRBLF);
|
dc.SetLogicalFunction(OGLRBLF);
|
||||||
|
|
||||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
wxPen dottedPen(*wxBLACK, 1, wxDOT);
|
||||||
dc.SetPen(dottedPen);
|
dc.SetPen(dottedPen);
|
||||||
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
||||||
|
|
||||||
@@ -1685,7 +1685,7 @@ void wxPolygonShape::OnSizingBeginDragLeft(wxControlPoint* pt, double x, double
|
|||||||
|
|
||||||
if (ppt->m_originalDistance == 0.0) ppt->m_originalDistance = (double) 0.0001;
|
if (ppt->m_originalDistance == 0.0) ppt->m_originalDistance = (double) 0.0001;
|
||||||
|
|
||||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
wxPen dottedPen(*wxBLACK, 1, wxDOT);
|
||||||
dc.SetPen(dottedPen);
|
dc.SetPen(dottedPen);
|
||||||
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
||||||
|
|
||||||
|
@@ -166,7 +166,7 @@ void wxCompositeShape::OnDragLeft(bool WXUNUSED(draw), double x, double y, int W
|
|||||||
GetCanvas()->PrepareDC(dc);
|
GetCanvas()->PrepareDC(dc);
|
||||||
|
|
||||||
dc.SetLogicalFunction(OGLRBLF);
|
dc.SetLogicalFunction(OGLRBLF);
|
||||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
wxPen dottedPen(*wxBLACK, 1, wxDOT);
|
||||||
dc.SetPen(dottedPen);
|
dc.SetPen(dottedPen);
|
||||||
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
||||||
|
|
||||||
@@ -186,7 +186,7 @@ void wxCompositeShape::OnBeginDragLeft(double x, double y, int WXUNUSED(keys), i
|
|||||||
|
|
||||||
dc.SetLogicalFunction(OGLRBLF);
|
dc.SetLogicalFunction(OGLRBLF);
|
||||||
|
|
||||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
wxPen dottedPen(*wxBLACK, 1, wxDOT);
|
||||||
dc.SetPen(dottedPen);
|
dc.SetPen(dottedPen);
|
||||||
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
||||||
m_canvas->CaptureMouse();
|
m_canvas->CaptureMouse();
|
||||||
|
@@ -585,7 +585,7 @@ void wxDividedShapeControlPoint::OnDragLeft(bool WXUNUSED(draw), double WXUNUSED
|
|||||||
GetCanvas()->PrepareDC(dc);
|
GetCanvas()->PrepareDC(dc);
|
||||||
|
|
||||||
dc.SetLogicalFunction(OGLRBLF);
|
dc.SetLogicalFunction(OGLRBLF);
|
||||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
wxPen dottedPen(*wxBLACK, 1, wxDOT);
|
||||||
dc.SetPen(dottedPen);
|
dc.SetPen(dottedPen);
|
||||||
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
||||||
|
|
||||||
@@ -604,7 +604,7 @@ void wxDividedShapeControlPoint::OnBeginDragLeft(double WXUNUSED(x), double y, i
|
|||||||
|
|
||||||
wxDividedShape *dividedObject = (wxDividedShape *)m_shape;
|
wxDividedShape *dividedObject = (wxDividedShape *)m_shape;
|
||||||
dc.SetLogicalFunction(OGLRBLF);
|
dc.SetLogicalFunction(OGLRBLF);
|
||||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
wxPen dottedPen(*wxBLACK, 1, wxDOT);
|
||||||
dc.SetPen(dottedPen);
|
dc.SetPen(dottedPen);
|
||||||
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
||||||
|
|
||||||
|
@@ -1613,9 +1613,9 @@ void wxPseudoMetaFile::ReadAttributes(wxExpr *clause, int whichAngle)
|
|||||||
{
|
{
|
||||||
int penWidth = (int)expr->Nth(1)->IntegerValue();
|
int penWidth = (int)expr->Nth(1)->IntegerValue();
|
||||||
int penStyle = (int)expr->Nth(2)->IntegerValue();
|
int penStyle = (int)expr->Nth(2)->IntegerValue();
|
||||||
int penRed = (int)expr->Nth(3)->IntegerValue();
|
unsigned char penRed = (unsigned char)expr->Nth(3)->IntegerValue();
|
||||||
int penGreen = (int)expr->Nth(4)->IntegerValue();
|
unsigned char penGreen = (unsigned char)expr->Nth(4)->IntegerValue();
|
||||||
int penBlue = (int)expr->Nth(5)->IntegerValue();
|
unsigned char penBlue = (unsigned char)expr->Nth(5)->IntegerValue();
|
||||||
wxColour col(penRed, penGreen, penBlue);
|
wxColour col(penRed, penGreen, penBlue);
|
||||||
wxPen *p = wxThePenList->FindOrCreatePen(col, penWidth, penStyle);
|
wxPen *p = wxThePenList->FindOrCreatePen(col, penWidth, penStyle);
|
||||||
if (!p)
|
if (!p)
|
||||||
@@ -1626,9 +1626,9 @@ void wxPseudoMetaFile::ReadAttributes(wxExpr *clause, int whichAngle)
|
|||||||
case gyTYPE_BRUSH:
|
case gyTYPE_BRUSH:
|
||||||
{
|
{
|
||||||
int brushStyle = (int)expr->Nth(1)->IntegerValue();
|
int brushStyle = (int)expr->Nth(1)->IntegerValue();
|
||||||
int brushRed = (int)expr->Nth(2)->IntegerValue();
|
unsigned char brushRed = (unsigned char)expr->Nth(2)->IntegerValue();
|
||||||
int brushGreen = (int)expr->Nth(3)->IntegerValue();
|
unsigned char brushGreen = (unsigned char)expr->Nth(3)->IntegerValue();
|
||||||
int brushBlue = (int)expr->Nth(4)->IntegerValue();
|
unsigned char brushBlue = (unsigned char)expr->Nth(4)->IntegerValue();
|
||||||
wxColour col(brushRed, brushGreen, brushBlue);
|
wxColour col(brushRed, brushGreen, brushBlue);
|
||||||
wxBrush *b = wxTheBrushList->FindOrCreateBrush(col, brushStyle);
|
wxBrush *b = wxTheBrushList->FindOrCreateBrush(col, brushStyle);
|
||||||
if (!b)
|
if (!b)
|
||||||
|
@@ -965,7 +965,7 @@ void wxLineShape::OnDrawOutline(wxDC& dc, double WXUNUSED(x), double WXUNUSED(y)
|
|||||||
wxPen *old_pen = m_pen;
|
wxPen *old_pen = m_pen;
|
||||||
wxBrush *old_brush = m_brush;
|
wxBrush *old_brush = m_brush;
|
||||||
|
|
||||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
wxPen dottedPen(*wxBLACK, 1, wxDOT);
|
||||||
SetPen(& dottedPen);
|
SetPen(& dottedPen);
|
||||||
SetBrush( wxTRANSPARENT_BRUSH );
|
SetBrush( wxTRANSPARENT_BRUSH );
|
||||||
|
|
||||||
@@ -1549,7 +1549,7 @@ void wxLineShape::ReadAttributes(wxExpr *clause)
|
|||||||
wxExpr *spacingExpr = node->Nth(7);
|
wxExpr *spacingExpr = node->Nth(7);
|
||||||
|
|
||||||
if (type_expr)
|
if (type_expr)
|
||||||
arrowType = (int)type_expr->IntegerValue();
|
arrowType = (WXTYPE)type_expr->IntegerValue();
|
||||||
if (end_expr)
|
if (end_expr)
|
||||||
arrowEnd = (int)end_expr->IntegerValue();
|
arrowEnd = (int)end_expr->IntegerValue();
|
||||||
if (dist_expr)
|
if (dist_expr)
|
||||||
@@ -1733,7 +1733,7 @@ void wxLineShape::OnSizingDragLeft(wxControlPoint* pt, bool WXUNUSED(draw), doub
|
|||||||
|
|
||||||
dc.SetLogicalFunction(OGLRBLF);
|
dc.SetLogicalFunction(OGLRBLF);
|
||||||
|
|
||||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
wxPen dottedPen(*wxBLACK, 1, wxDOT);
|
||||||
dc.SetPen(dottedPen);
|
dc.SetPen(dottedPen);
|
||||||
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
||||||
|
|
||||||
@@ -1749,7 +1749,7 @@ void wxLineShape::OnSizingDragLeft(wxControlPoint* pt, bool WXUNUSED(draw), doub
|
|||||||
wxPen *old_pen = lineShape->GetPen();
|
wxPen *old_pen = lineShape->GetPen();
|
||||||
wxBrush *old_brush = lineShape->GetBrush();
|
wxBrush *old_brush = lineShape->GetBrush();
|
||||||
|
|
||||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
wxPen dottedPen(*wxBLACK, 1, wxDOT);
|
||||||
lineShape->SetPen(& dottedPen);
|
lineShape->SetPen(& dottedPen);
|
||||||
lineShape->SetBrush(wxTRANSPARENT_BRUSH);
|
lineShape->SetBrush(wxTRANSPARENT_BRUSH);
|
||||||
|
|
||||||
@@ -1797,7 +1797,7 @@ void wxLineShape::OnSizingBeginDragLeft(wxControlPoint* pt, double x, double y,
|
|||||||
wxPen *old_pen = lineShape->GetPen();
|
wxPen *old_pen = lineShape->GetPen();
|
||||||
wxBrush *old_brush = lineShape->GetBrush();
|
wxBrush *old_brush = lineShape->GetBrush();
|
||||||
|
|
||||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
wxPen dottedPen(*wxBLACK, 1, wxDOT);
|
||||||
lineShape->SetPen(& dottedPen);
|
lineShape->SetPen(& dottedPen);
|
||||||
lineShape->SetBrush(wxTRANSPARENT_BRUSH);
|
lineShape->SetBrush(wxTRANSPARENT_BRUSH);
|
||||||
|
|
||||||
@@ -2407,7 +2407,7 @@ wxLabelShape::wxLabelShape(wxLineShape *parent, wxShapeRegion *region, double w,
|
|||||||
{
|
{
|
||||||
m_lineShape = parent;
|
m_lineShape = parent;
|
||||||
m_shapeRegion = region;
|
m_shapeRegion = region;
|
||||||
SetPen(wxThePenList->FindOrCreatePen(wxColour(0, 0, 0), 1, wxDOT));
|
SetPen(wxThePenList->FindOrCreatePen(*wxBLACK, 1, wxDOT));
|
||||||
}
|
}
|
||||||
|
|
||||||
wxLabelShape::~wxLabelShape()
|
wxLabelShape::~wxLabelShape()
|
||||||
|
@@ -560,14 +560,14 @@ bool wxXMetaFile::ReadFile(const wxChar *file)
|
|||||||
/* int lfEsc = */ getshort(handle); // 2 bytes
|
/* int lfEsc = */ getshort(handle); // 2 bytes
|
||||||
/* int lfOrient = */ getshort(handle); // 2 bytes
|
/* int lfOrient = */ getshort(handle); // 2 bytes
|
||||||
int lfWeight = getshort(handle); // 2 bytes
|
int lfWeight = getshort(handle); // 2 bytes
|
||||||
char lfItalic = getc(handle); // 1 byte
|
char lfItalic = (char)getc(handle); // 1 byte
|
||||||
char lfUnderline = getc(handle); // 1 byte
|
char lfUnderline = (char)getc(handle); // 1 byte
|
||||||
/* char lfStrikeout = */ getc(handle); // 1 byte
|
/* char lfStrikeout = */ getc(handle); // 1 byte
|
||||||
/* char lfCharSet = */ getc(handle); // 1 byte
|
/* char lfCharSet = */ getc(handle); // 1 byte
|
||||||
/* char lfOutPrecision = */ getc(handle); // 1 byte
|
/* char lfOutPrecision = */ getc(handle); // 1 byte
|
||||||
/* char lfClipPrecision = */ getc(handle); // 1 byte
|
/* char lfClipPrecision = */ getc(handle); // 1 byte
|
||||||
/* char lfQuality = */ getc(handle); // 1 byte
|
/* char lfQuality = */ getc(handle); // 1 byte
|
||||||
char lfPitchAndFamily = getc(handle); // 1 byte (18th)
|
char lfPitchAndFamily = (char)getc(handle); // 1 byte (18th)
|
||||||
char lfFacename[32];
|
char lfFacename[32];
|
||||||
// Read the rest of the record, which is total record size
|
// Read the rest of the record, which is total record size
|
||||||
// minus the number of bytes already read (18 record, 6 metarecord
|
// minus the number of bytes already read (18 record, 6 metarecord
|
||||||
|
@@ -175,7 +175,7 @@ void wxDiagram::ShowAll(bool show)
|
|||||||
|
|
||||||
void wxDiagram::DrawOutline(wxDC& dc, double x1, double y1, double x2, double y2)
|
void wxDiagram::DrawOutline(wxDC& dc, double x1, double y1, double x2, double y2)
|
||||||
{
|
{
|
||||||
wxPen dottedPen(wxColour(0, 0, 0), 1, wxDOT);
|
wxPen dottedPen(*wxBLACK, 1, wxDOT);
|
||||||
dc.SetPen(dottedPen);
|
dc.SetPen(dottedPen);
|
||||||
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
dc.SetBrush((* wxTRANSPARENT_BRUSH));
|
||||||
|
|
||||||
|
@@ -452,7 +452,7 @@ wxStringList *oglFormatText(wxDC& dc, const wxString& text, double width, double
|
|||||||
wxString oldBuffer(buffer);
|
wxString oldBuffer(buffer);
|
||||||
|
|
||||||
wxString s = node->GetData();
|
wxString s = node->GetData();
|
||||||
if (s.IsEmpty())
|
if (s.empty())
|
||||||
{
|
{
|
||||||
// FORCE NEW LINE
|
// FORCE NEW LINE
|
||||||
if (buffer.Length() > 0)
|
if (buffer.Length() > 0)
|
||||||
@@ -871,10 +871,12 @@ wxColour oglHexToColour(const wxString& hex)
|
|||||||
hex.Mid(0,2).ToLong(&r, 16);
|
hex.Mid(0,2).ToLong(&r, 16);
|
||||||
hex.Mid(2,2).ToLong(&g, 16);
|
hex.Mid(2,2).ToLong(&g, 16);
|
||||||
hex.Mid(4,2).ToLong(&b, 16);
|
hex.Mid(4,2).ToLong(&b, 16);
|
||||||
return wxColour(r, g, b);
|
return wxColour((unsigned char)r,
|
||||||
|
(unsigned char)g,
|
||||||
|
(unsigned char)b);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return wxColour(0,0,0);
|
return *wxBLACK;
|
||||||
}
|
}
|
||||||
|
|
||||||
// RGB to 3-digit hex
|
// RGB to 3-digit hex
|
||||||
|
Reference in New Issue
Block a user