+ POINTL vPoint[2];
+ LONG lControl;
+ LONG lColor;
+ LONG lBorderColor;
+ int nIsTRANSPARENT = 0;
+
+ vY = OS2Y(vY,vHeight);
+
+ wxCoord vX2 = vX + vWidth;
+ wxCoord vY2 = vY + vHeight;
+
+ vPoint[0].x = vX;
+ vPoint[0].y = vY;
+ vPoint[1].x = vX + vWidth;
+ vPoint[1].y = vY + vHeight;
+ ::GpiMove(m_hPS, &vPoint[0]);
+ lColor = m_brush.GetColour().GetPixel();
+ lBorderColor = m_pen.GetColour().GetPixel();
+ if (m_brush.GetStyle() == wxTRANSPARENT)
+ nIsTRANSPARENT = 1;
+ if(lColor == lBorderColor || nIsTRANSPARENT)
+ {
+ lControl = DRO_OUTLINEFILL; //DRO_FILL;
+ if(m_brush.GetStyle() == wxTRANSPARENT)
+ lControl = DRO_OUTLINE;
+
+ ::GpiSetColor(m_hPS, lColor);
+ ::GpiBox( m_hPS // handle to a presentation space
+ ,lControl // draw the box outline ? or ?
+ ,&vPoint[1] // address of the corner
+ ,0L // horizontal corner radius
+ ,0L // vertical corner radius
+ );
+ }
+ else
+ {
+ lControl = DRO_OUTLINE;
+ ::GpiSetColor( m_hPS
+ ,lBorderColor
+ );
+ ::GpiBox( m_hPS
+ ,lControl
+ ,&vPoint[1]
+ ,0L
+ ,0L
+ );
+ lControl = DRO_FILL;
+ ::GpiSetColor( m_hPS
+ ,lColor
+ );
+ vPoint[0].x = vX + 1;
+ vPoint[0].y = vY + 1;
+ vPoint[1].x = vX + vWidth - 1;
+ vPoint[1].y = vY + vHeight - 1;
+ ::GpiMove(m_hPS, &vPoint[0]);
+ ::GpiBox( m_hPS
+ ,lControl
+ ,&vPoint[1]
+ ,0L
+ ,0L
+ );
+ }
+ CalcBoundingBox(vX, vY);
+ CalcBoundingBox(vX2, vY2);
+} // end of wxDC::DoDrawRectangle
+
+void wxDC::DoDrawRoundedRectangle(
+ wxCoord vX
+, wxCoord vY
+, wxCoord vWidth
+, wxCoord vHeight
+, double dRadius
+)
+{
+ POINTL vPoint[2];
+ LONG lControl;
+
+ vY = OS2Y(vY,vHeight);
+
+ wxCoord vX2 = (vX + vWidth);
+ wxCoord vY2 = (vY + vHeight);
+
+ vPoint[0].x = vX;
+ vPoint[0].y = YLOG2DEV(vY) - vHeight;
+ vPoint[1].x = vX + vWidth;
+ vPoint[1].y = vY;
+ ::GpiMove(m_hPS, &vPoint[0]);
+
+ lControl = DRO_OUTLINEFILL; //DRO_FILL;
+ if (m_brush.GetStyle() == wxTRANSPARENT)
+ lControl = DRO_OUTLINE;
+ ::GpiBox( m_hPS // handle to a presentation space
+ ,DRO_OUTLINE // draw the box outline ? or ?
+ ,&vPoint[1] // address of the corner
+ ,(LONG)dRadius // horizontal corner radius
+ ,(LONG)dRadius // vertical corner radius
+ );
+ CalcBoundingBox(vX, vY);
+ CalcBoundingBox(vX2, vY2);
+} // end of wxDC::DoDrawRoundedRectangle
+
+// Draw Ellipse within box (x,y) - (x+width, y+height)
+void wxDC::DoDrawEllipse(
+ wxCoord vX
+, wxCoord vY
+, wxCoord vWidth
+, wxCoord vHeight
+)
+{
+ POINTL vPtlPos; // Structure for current position
+ FIXED vFxMult; // Multiplier for ellipse
+ ARCPARAMS vArcp; // Structure for arc parameters
+
+ vY = OS2Y(vY,vHeight);
+
+ vArcp.lR = 0;
+ vArcp.lQ = vHeight/2;
+ vArcp.lP = vWidth/2;
+ vArcp.lS = 0;
+ ::GpiSetArcParams( m_hPS
+ ,&vArcp
+ ); // Sets parameters to default
+ vPtlPos.x = vX + vWidth/2; // Loads x-coordinate
+ vPtlPos.y = vY + vHeight/2; // Loads y-coordinate
+ ::GpiMove( m_hPS
+ ,&vPtlPos
+ ); // Sets current position
+ vFxMult = MAKEFIXED(1, 0); /* Sets multiplier */