examples/openvg/star/starwidget.cpp
branchRCL_3
changeset 7 3f74d0d4af4c
parent 4 3b1da2848fc7
--- a/examples/openvg/star/starwidget.cpp	Mon Mar 15 12:43:09 2010 +0200
+++ b/examples/openvg/star/starwidget.cpp	Thu Apr 08 14:19:33 2010 +0300
@@ -93,8 +93,9 @@
     // and prepare to perform raw OpenVG calls.
     painter.beginNativePainting();
 
-    // Cache the path if we haven't already.
-    if (path == VG_INVALID_HANDLE) {
+    // Cache the path if we haven't already or if the path has
+    // become invalid because the window's context has changed.
+    if (path == VG_INVALID_HANDLE || !vgGetPathCapabilities(path)) {
         path = vgCreatePath(VG_PATH_FORMAT_STANDARD,
                             VG_PATH_DATATYPE_F,
                             1.0f, // scale