[Igarden-commit] CommonSource/YAAFExtensions RGGLSVGDraw.cpp, 1.26.2.1, 1.26.2.2
Status: Beta
Brought to you by:
jlbedell
|
From: Jeffrey B. <jlb...@us...> - 2006-11-02 23:43:20
|
Update of /cvsroot/igarden/CommonSource/YAAFExtensions In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv27363 Modified Files: Tag: Release_branch_v1 RGGLSVGDraw.cpp Log Message: Add z-axis Index: RGGLSVGDraw.cpp =================================================================== RCS file: /cvsroot/igarden/CommonSource/YAAFExtensions/RGGLSVGDraw.cpp,v retrieving revision 1.26.2.1 retrieving revision 1.26.2.2 diff -C2 -d -r1.26.2.1 -r1.26.2.2 *** RGGLSVGDraw.cpp 29 Oct 2006 03:31:56 -0000 1.26.2.1 --- RGGLSVGDraw.cpp 2 Nov 2006 23:43:15 -0000 1.26.2.2 *************** *** 310,314 **** double zPos = -0.1; titleTag_t tag, tag2; ! bool forX, forY, xGrows, yGrows; long xReps, yReps, xIndex, yIndex; const char *nextCh, *tmp; --- 310,314 ---- double zPos = -0.1; titleTag_t tag, tag2; ! bool forX, forY, xGrows, yGrows, fillVisible, strokeVisible; long xReps, yReps, xIndex, yIndex; const char *nextCh, *tmp; *************** *** 519,530 **** else if(strcmp(data->GetTag(), "polyline") == 0) { ! val = data->GetArgValue("points"); ! glBegin(GL_LINE_STRIP); ! while(*val != '\0') { ! val = ParseOnePoint(val, true, xSize, ySize, _bounds.top, _bounds.left, xPos, yPos); ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, 0.0); // Z axis taken care of on glTranslate } - glEnd(); } else if(strcmp(data->GetTag(), "rect") == 0) --- 519,556 ---- else if(strcmp(data->GetTag(), "polyline") == 0) { ! fillVisible = IsFillStyleVisible(data); ! strokeVisible = IsStrokeStyleVisible(data); ! ! if(fillVisible) { ! val = data->GetArgValue("points"); ! glBegin(GL_POLYGON); ! SetFillStyle(data); ! while(*val != '\0') ! { ! val = ParseOnePoint(val, true, xSize, ySize, _bounds.top, _bounds.left, xPos, yPos); ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); // Z axis taken care of on glTranslate ! } ! glEnd(); ! } ! ! if(fillVisible || strokeVisible) ! { ! if(strokeVisible) ! SetStrokeStyle(data, scaleX, scaleY); ! ! glPushAttrib(GL_LINE_BIT); ! glEnable (GL_LINE_SMOOTH); ! glHint (GL_LINE_SMOOTH_HINT, GL_NICEST); ! val = data->GetArgValue("points"); ! glBegin(GL_LINE_STRIP); ! while(*val != '\0') ! { ! val = ParseOnePoint(val, true, xSize, ySize, _bounds.top, _bounds.left, xPos, yPos); ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); // Z axis taken care of on glTranslate ! } ! glEnd(); ! glPopAttrib(); } } else if(strcmp(data->GetTag(), "rect") == 0) *************** *** 549,584 **** yPos = ((ySize-yPos) - (ySize/2)); ! if(IsStrokeStyleVisible(data)) { ! glBegin(GL_LINE_STRIP); ! SetStrokeStyle(data, scaleX, scaleY); ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, 0.0); ! xPos += width; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, 0.0); ! yPos -= height; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, 0.0); ! xPos -= width; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, 0.0); ! yPos += height; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, 0.0); glEnd(); } ! ! if(IsFillStyleVisible(data)) { ! glBegin(GL_POLYGON); ! SetFillStyle(data); ! ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); ! xPos += width; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); ! yPos -= height; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); ! xPos -= width; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); ! yPos += height; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); glEnd(); } } --- 575,618 ---- yPos = ((ySize-yPos) - (ySize/2)); ! fillVisible = IsFillStyleVisible(data); ! strokeVisible = IsStrokeStyleVisible(data); ! ! if(fillVisible) { ! SetFillStyle(data); ! glBegin(GL_POLYGON); ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); ! yPos -= height; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); ! xPos += width; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); ! yPos += height; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); ! xPos -= width; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); glEnd(); } ! ! if(fillVisible || strokeVisible) { ! if(strokeVisible) ! SetStrokeStyle(data, scaleX, scaleY); ! ! glPushAttrib(GL_LINE_BIT); ! glEnable (GL_LINE_SMOOTH); ! glHint (GL_LINE_SMOOTH_HINT, GL_NICEST); ! glBegin(GL_LINE_STRIP); ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); ! xPos += width; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); ! yPos -= height; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); ! xPos -= width; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); ! yPos += height; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); glEnd(); + glPopAttrib(); } } *************** *** 622,642 **** glEnable(GL_MAP1_VERTEX_3); ! if(IsStrokeStyleVisible(data)) ! { ! glBegin(GL_LINE_STRIP); ! SetStrokeStyle(data, scaleX, scaleY); ! EnumeratePathVertices(dval, xOffset, yOffset, 0.0, xSize, ySize, scaleX, scaleY, translateX, translateY); ! glEnd(); ! } ! ! if(IsFillStyleVisible(data)) { dval = data->GetArgValue("d"); - glBegin(GL_POLYGON); SetFillStyle(data); ! EnumeratePathVertices(dval, xOffset, yOffset, zOffset, xSize, ySize, scaleX, scaleY, translateX, translateY); glEnd(); } glPopAttrib(); --- 656,685 ---- glEnable(GL_MAP1_VERTEX_3); ! fillVisible = IsFillStyleVisible(data); ! strokeVisible = IsStrokeStyleVisible(data); ! ! if(fillVisible) { dval = data->GetArgValue("d"); SetFillStyle(data); ! glBegin(GL_POLYGON); ! EnumeratePathVertices(dval, xOffset, yOffset, zOffset, xSize, ySize, scaleX, scaleY, translateX, translateY); glEnd(); } + if(fillVisible || strokeVisible) + { + if(strokeVisible) + SetStrokeStyle(data, scaleX, scaleY); + + glPushAttrib(GL_LINE_BIT); + glEnable (GL_LINE_SMOOTH); + glHint (GL_LINE_SMOOTH_HINT, GL_NICEST); + glBegin(GL_LINE_STRIP); + EnumeratePathVertices(dval, xOffset, yOffset, 0.0, xSize, ySize, scaleX, scaleY, translateX, translateY); + glEnd(); + glPopAttrib(); + } + glPopAttrib(); |