STUB int RubyDialogCallback_isAutoResizeEnabled(RubyDialog *dref);
STUB int RubyDialogCallback_Listen(RubyDialog *dref, void *obj, const char *objtype, const char *msg, RubyValue oval, RubyValue pval);
STUB void RubyDialogCallback_clear(RubyDialog *dref);
-STUB void RubyDialogCallback_drawEllipse(RubyDialog *dref, float x, float y, float rad1, float rad2);
+STUB void RubyDialogCallback_drawEllipse(RubyDialog *dref, float x, float y, float r1, float r2);
STUB void RubyDialogCallback_drawLine(RubyDialog *dref, int ncoords, float *coords);
STUB void RubyDialogCallback_drawRectangle(RubyDialog *dref, float x, float y, float width, float height, float round);
STUB void RubyDialogCallback_drawText(RubyDialog *dref, const char *s, float x, float y);
if (ret == 0)
return NULL;
if (ret & 1) {
- wxColour fgcol(fg[0] * 255, fg[1] * 255, fg[2] * 255);
+ wxColour fgcol((int)(fg[0] * 255), (int)(fg[1] * 255), (int)(fg[2] * 255));
subTitleRowAttr->SetTextColour(fgcol);
} else subTitleRowAttr->SetTextColour(*wxBLACK);
if (ret & 2) {
- wxColour bgcol(bg[0] * 255, bg[1] * 255, bg[2] * 255);
+ wxColour bgcol((int)(bg[0] * 255), (int)(bg[1] * 255), (int)(bg[2] * 255));
subTitleRowAttr->SetBackgroundColour(bgcol);
} else subTitleRowAttr->SetBackgroundColour(*wxWHITE);
return subTitleRowAttr;
static inline wxRect
wxRectFromRDRect(RDRect rframe)
{
- wxRect frame(rframe.origin.x, rframe.origin.y, rframe.size.width, rframe.size.height);
+ wxRect frame((int)rframe.origin.x, (int)rframe.origin.y, (int)rframe.size.width, (int)rframe.size.height);
return frame;
}
RubyDialogCallback_setWindowMinSize(RubyDialog *dref, RDSize size)
{
wxSize minSize;
- minSize.x = size.width;
- minSize.y = size.height;
+ minSize.x = (int)size.width;
+ minSize.y = (int)size.height;
((RubyDialogFrame *)dref)->SetMinSize(minSize);
}
void
RubyDialogCallback_setWindowSize(RubyDialog *dref, RDSize size)
{
- wxSize wsize(size.width, size.height);
+ wxSize wsize((int)size.width, (int)size.height);
((RubyDialogFrame *)dref)->SetSize(wsize);
((RubyDialogFrame *)dref)->CentreOnScreen();
}
}
void
-RubyDialogCallback_drawEllipse(RubyDialog *dref, float x, float y, float rad1, float rad2)
+RubyDialogCallback_drawEllipse(RubyDialog *dref, float x, float y, float r1, float r2)
{
wxDC *dcp = ((RubyDialogFrame *)dref)->currentContext;
if (dcp == NULL)
return;
- dcp->DrawEllipse(x - rad1, y - rad2, rad1 * 2, rad2 * 2);
+ dcp->DrawEllipse(x - r1, y - r2, r1 * 2, r2 * 2);
}
void
if (dcp == NULL)
return;
if (round > 0.0)
- dcp->DrawRoundedRectangle(x, y, width, height, round);
+ dcp->DrawRoundedRectangle((int)x, (int)y, (int)width, (int)height, (int)round);
else
- dcp->DrawRectangle(x, y, width, height);
+ dcp->DrawRectangle((int)x, (int)y, (int)width, (int)height);
}
void
void
RubyDialogCallback_setForegroundColorForItem(RDItem *item, const double *col)
{
- wxColour wcol(col[0] * 255, col[1] * 255, col[2] * 255, col[3] * 255);
+ wxColour wcol((int)(col[0] * 255), (int)(col[1] * 255), (int)(col[2] * 255), (int)(col[3] * 255));
((wxWindow *)item)->SetForegroundColour(wcol);
}
void
RubyDialogCallback_setBackgroundColorForItem(RDItem *item, const double *col)
{
- wxColour wcol(col[0] * 255, col[1] * 255, col[2] * 255, col[3] * 255);
+ wxColour wcol((int)(col[0] * 255), (int)(col[1] * 255), (int)(col[2] * 255), (int)(col[3] * 255));
((wxWindow *)item)->SetBackgroundColour(wcol);
}