[api-dev] Re: how to change a Graphic ContourPolyPolygon
OK found it myself:
a ContourPolyPolygon is a bouble Array, with a Array of plygons and
Arrays of Point structures based on the size of the original graphic
oGraphicobject.graphic) who are needed to build the controur Polygon.
now it's easy to change the Polygon points to fit the new size of the
oPoly = thiscomponent.currentselection.contourpolypolygon(0)
PolyPoints = oPoly(0)
teller = ubound( PolyPoints())
for i = 0 to teller
PolyPoints(i).x = int(PolyPoints(i).x*1.5) ' or whatever change we
will to make
PolyPoints(i).y = int(PolyPoints(i).y*1.5)
' passing back the values
oPoly(0) = PolyPoints()
hope it can serve others
> I Trie to preserve the Graphicobject ContourPolyPolygon after i
> changed the Graphic behind this object. The original Contour is still
> there but with the size , position off the old Graphic.
> How can i using BASIC, change this ContourPolyPolygon also named "
> ::com::sun::star::drawing::PointSequenceSequence" and adapt the
> contour to the new size and positions of the underling Graphic ?
> Thanks for any hint.