Monthly Archives: April 2007

another very easy task for gdi+.

to obtain some basic image information, such as width, height, resolution and pixelformat, all we need is to initialize a gdi+ image object and get some property values, as shown below:


all samples below use the new gdiplus-x library, that is still in alpha version, but is already stable and reliable to do the majority of gdi+ tasks. download the latest stable release from codeplex:

local lcimage
lcimage =
if empty(lcimage)

do locfile("")

local loimg as xfcimage
with _screen.system.drawing
loimg = .… Continue reading

this is a continuation of my previous post, full-justified text with gdiplusx . now i'll show how we can use the new method drawstringjustified from gdiplusx library to have full justified texts in our reports.


there are 2 ways of using this feature in reports.

the most obvious is to use the picture saved in the samples from the previous post, and use it directly in the report.

but vfp9 brings so many other cool possibilities, that i couldn't leave them without a try, so i decided to create a subclass of the report listener that will transform some of the texts from… Continue reading