contour has no visible color and thickness?

When i create a contour with this code. I see the contour only in wireframe mode. 
What i do it wrong?
Iwould like to have a red thin outline. And also would like break appart this outline.

            corelApp.ActiveDocument.Unit = cdrUnit.cdrMillimeter;
            corelApp.ActiveLayer.Shapes[1].CreateContour(cdrContourDirection.cdrContourOutside, 3.5, 1, 0, corelApp.CreateRGBColor(255, 0, 0), 
corelApp.CreateRGBColor(255, 255, 255), corelApp.CreateCMYKColor(0, 0, 0, 100), 0, 0,cdrContourEndCapType.cdrContourRoundCap, cdrContourCornerType.cdrContourCornerRound, 15); }
  • Remo, 

    Yeah, the outline color is set, but it has no thickness so it will not show. Always found that odd. The CreateContour returns an Effect. So you could do something like this:

     Sub CreateRedContour()
        Dim sr As ShapeRange, eff As Effect
        Set sr = ActiveSelectionRange
        Set eff = sr(1).CreateContour(cdrContourOutside, 0.09)
        eff.Contour.ContourGroup.Shapes(1).Outline.SetProperties 0.001, , CreateRGBColor(255, 0, 0)
     End Sub

    If you want to break apart the contour you can get it like this:

      Sub CreateRedContour()
        Dim sr As ShapeRange, sContour As Shape
        Set sr = ActiveSelectionRange
        Set sContour = sr(1).CreateContour(cdrContourOutside, 0.09).Separate(1)
        sContour.Outline.SetProperties 0.001, , CreateRGBColor(255, 0, 0)
     End Sub

    Hope that helps and happy coding, 


Reply Children
No Data