diff -r 7c5dd702d6d3 -r f93c875b566e uiacceltk/hitchcock/coretoolkit/rendervg10/src/HuiVg10Gc.cpp --- a/uiacceltk/hitchcock/coretoolkit/rendervg10/src/HuiVg10Gc.cpp Tue May 11 17:03:00 2010 +0300 +++ b/uiacceltk/hitchcock/coretoolkit/rendervg10/src/HuiVg10Gc.cpp Tue May 25 13:39:57 2010 +0300 @@ -105,6 +105,8 @@ vgDestroyPaint(iPaint); vgDestroyPaint(iGradientPaint); vgDestroyPath(iEllipsePath); + + iTempRegion.Close(); } @@ -978,8 +980,8 @@ #if defined(RENDER_DEBUG_RECTANGLES) color = Math::Random() | 0xff; #endif - - // Update the color of the current paint + vgSetPaint(iPaint, VG_FILL_PATH | VG_STROKE_PATH); + // Update the color of the current paint // if required if (iPaintColor != color) { @@ -2085,12 +2087,12 @@ 1.0f, aEndColor.Red() * scale, aEndColor.Green() * scale, aEndColor.Blue() * scale, aEndOpacity, }; + vgSetParameterfv(iGradientPaint, VG_PAINT_LINEAR_GRADIENT, 2 * 2, gradientCoords); vgSetParameterfv(iGradientPaint, VG_PAINT_COLOR_RAMP_STOPS, 2 * 5, gradientStops); vgSetPaint(iGradientPaint, VG_FILL_PATH); HUI_VG_INVARIANT(); - UpdateColor(); UpdateMatrix(VG_MATRIX_PATH_USER_TO_SURFACE); // Draw the gradient as an image if we have a texture, otherwise draw a regular rectangle @@ -2117,7 +2119,16 @@ if (!tex) { - DrawRect(aRect); + UpdateMatrix(VG_MATRIX_PATH_USER_TO_SURFACE); + vgSeti(VG_MATRIX_MODE, VG_MATRIX_PATH_USER_TO_SURFACE); + + vgTranslate(aRect.iTl.iX, aRect.iTl.iY); + vgScale(aRect.Width(),aRect.Height()); + + vgDrawPath(iRectPath, VG_FILL_PATH); + + vgSeti(VG_MATRIX_MODE, VG_MATRIX_IMAGE_USER_TO_SURFACE); + UpdateMatrix(VG_MATRIX_PATH_USER_TO_SURFACE); } else { @@ -2127,12 +2138,20 @@ } else { - DrawRect(aRect); + UpdateMatrix(VG_MATRIX_PATH_USER_TO_SURFACE); + vgSeti(VG_MATRIX_MODE, VG_MATRIX_PATH_USER_TO_SURFACE); + + vgTranslate(aRect.iTl.iX, aRect.iTl.iY); + vgScale(aRect.Width(),aRect.Height()); + + vgDrawPath(iRectPath, VG_FILL_PATH); + + vgSeti(VG_MATRIX_MODE, VG_MATRIX_IMAGE_USER_TO_SURFACE); + UpdateMatrix(VG_MATRIX_PATH_USER_TO_SURFACE); } HUI_VG_INVARIANT(); - // Restore the original paint - vgSetPaint(iPaint, VG_FILL_PATH | VG_STROKE_PATH); + // Restore the original color & paint UpdateColor(); }