m_parent = NULL;
m_formatMode = FORMAT_CENTRE_HORIZ | FORMAT_CENTRE_VERT;
m_shadowMode = SHADOW_NONE;
- m_shadowOffsetX = 6.0;
- m_shadowOffsetY = 6.0;
+ m_shadowOffsetX = 6;
+ m_shadowOffsetY = 6;
m_shadowBrush = wxBLACK_BRUSH;
- m_textMarginX = 5.0;
- m_textMarginY = 5.0;
+ m_textMarginX = 5;
+ m_textMarginY = 5;
m_regionName = "0";
m_centreResize = TRUE;
m_maintainAspectRatio = FALSE;
wxShapeRegion *region = (wxShapeRegion *)node->Data();
region->SetText(s);
- dc.SetFont(region->GetFont());
+ dc.SetFont(* region->GetFont());
region->GetSize(&w, &h);
GetBoundingBoxMin(&bound_x, &bound_y);
if (m_regions.Number() < 1) return;
- if (m_pen) dc.SetPen(m_pen);
+ if (m_pen) dc.SetPen(* m_pen);
wxShapeRegion *region = (wxShapeRegion *)m_regions.First()->Data();
- if (region->GetFont()) dc.SetFont(region->GetFont());
+ if (region->GetFont()) dc.SetFont(* region->GetFont());
dc.SetTextForeground(* (region->GetActualColourObject()));
dc.SetBackgroundMode(wxTRANSPARENT);
if (m_pen)
penWidth = m_pen->GetWidth();
- dc.SetPen(g_oglWhiteBackgroundPen);
- dc.SetBrush(g_oglWhiteBackgroundBrush);
+ dc.SetPen(* g_oglWhiteBackgroundPen);
+ dc.SetBrush(* g_oglWhiteBackgroundBrush);
dc.DrawRectangle(WXROUND(topLeftX - penWidth), WXROUND(topLeftY - penWidth),
WXROUND(maxX + penWidth*2.0 + 4.0), WXROUND(maxY + penWidth*2.0 + 4.0));
}
else if (string_expr->Type() == wxExprList)
{
wxExpr *first = string_expr->value.first;
- wxExpr *second = first ? first->next : NULL;
- wxExpr *third = second ? second->next : NULL;
+ wxExpr *second = first ? first->next : (wxExpr*) NULL;
+ wxExpr *third = second ? second->next : (wxExpr*) NULL;
if (first && second && third &&
(first->Type() == wxExprReal || first->Type() == wxExprInteger) &&
if (brush_string == "")
brush_string = "WHITE";
- if (pen_string[0] == '#')
+ if (pen_string.GetChar(0) == '#')
{
wxColour col(oglHexToColour(pen_string.After('#')));
m_pen = wxThePenList->FindOrCreatePen(col, pen_width, pen_style);
if (!m_pen)
m_pen = wxBLACK_PEN;
- if (brush_string[0] == '#')
+ if (brush_string.GetChar(0) == '#')
{
wxColour col(oglHexToColour(brush_string.After('#')));
m_brush = wxTheBrushList->FindOrCreateBrush(col, brush_style);
m_formatted = TRUE; // Assume text is formatted unless we prove otherwise
- while (regionExpr = clause->AttributeValue(regionNameBuf))
+ while ((regionExpr = clause->AttributeValue(regionNameBuf)))
{
/*
* Get the region information
else if (string_expr->Type() == wxExprList)
{
wxExpr *first = string_expr->value.first;
- wxExpr *second = first ? first->next : NULL;
- wxExpr *third = second ? second->next : NULL;
+ wxExpr *second = first ? first->next : (wxExpr*) NULL;
+ wxExpr *third = second ? second->next : (wxExpr*) NULL;
if (first && second && third &&
(first->Type() == wxExprReal || first->Type() == wxExprInteger) &&
if (!m_drawHandles)
return;
- dc.SetBrush(wxBLACK_BRUSH);
- dc.SetPen(wxBLACK_PEN);
+ dc.SetBrush(* wxBLACK_BRUSH);
+ dc.SetPen(* wxBLACK_PEN);
wxNode *node = m_controlPoints.First();
while (node)