examples/openvg/star/starwidget.cpp
changeset 19 fcece45ef507
parent 18 2f34d5167611
child 30 5dc02b23752f
equal deleted inserted replaced
18:2f34d5167611 19:fcece45ef507
    91 
    91 
    92     // Flush the state changes to the OpenVG implementation
    92     // Flush the state changes to the OpenVG implementation
    93     // and prepare to perform raw OpenVG calls.
    93     // and prepare to perform raw OpenVG calls.
    94     painter.beginNativePainting();
    94     painter.beginNativePainting();
    95 
    95 
    96     // Cache the path if we haven't already.
    96     // Cache the path if we haven't already or if the path has
    97     if (path == VG_INVALID_HANDLE) {
    97     // become invalid because the window's context has changed.
       
    98     if (path == VG_INVALID_HANDLE || !vgGetPathCapabilities(path)) {
    98         path = vgCreatePath(VG_PATH_FORMAT_STANDARD,
    99         path = vgCreatePath(VG_PATH_FORMAT_STANDARD,
    99                             VG_PATH_DATATYPE_F,
   100                             VG_PATH_DATATYPE_F,
   100                             1.0f, // scale
   101                             1.0f, // scale
   101                             0.0f, // bias
   102                             0.0f, // bias
   102                             6,    // segmentCapacityHint
   103                             6,    // segmentCapacityHint