Monthly Archives: July 2009

this post is just to answer a question from mr. reed.

bob powell, in his great website site says: "the trick here is to use a graphicspath object to assemble a collection of  lines and arcs that make up the rounded rectangle shape.

arcs are used to round off the corners, so you have to position the lines 1 radius, whatever that may be, from the actual corner."


the code below shows bob's function converted to vfp and gdiplusx, to obtain this result:


local lobmp as xfcbitmap, logfx as xfcgraphics
with _screen.system.drawing as xfcdrawing… Continue reading

vfp9 brought a new property that allows us to draw all kinds of shapes, without the need of any external component, even a single windoes api call.

according to the vfp9 help, the polypoints property of the shape control "specifies an array of coordinates for creating polygon shapes using the shape control and polygon lines using the line control. read/write at design time and run time. for shape controls, polypoints creates a polygon shape."

mvp luis maria guayan from argentina already did an amazing job using the polypoints property, in 2 articles.

dibujando polígonos con vfp 9.0 - a simple… Continue reading

The samples below use the Graphics.SetClip function to draw shaped borders in your pictures.

The trick here is to use the CombineMode.Xor enumeration, that forces the drawing to the external part of the shape, like in the samples below:

We'll be playing with the source image below:

Visual FoxPro 9 and the GdiplusX library from VFPX 

Sample 1: Ellipse Shape

DO LOCFILE("System.App")
 * get an image file
	LOCAL loBmp AS xfcBitMap
	m.loBmp = .BITMAP.FromFile(GETPICT())
 * create a gfx object that will… Continue reading