Monthly Archives: March 2012

Gdi+ provides many ways to draw rotated objects, like images, strings and shapes. Basically, we need to do a translate transformation to the location of the text, then a rotate transform through the required angle, and then writing the text as normal using drawstring.


This is the definition found in MSDN: "The rotation operation consists of multiplying the transformation matrix by a matrix whose elements are derived from the angle parameter. This method applies the rotation by prepending it to the transformation matrix."




All samples below use the new GDIPlus-X library, that is still in… Continue reading

Recently I was navigating at Rick Strahl's Blog, when I found a very interesting post, "A Captcha Image generator for FoxPro", in which he shows how he created some captcha images. As Rick said in his post, "CAPTCHA basically displays a verification image next to a textbox that has to be filled out to validate the current request. It’s not a foolproof approach for validation and it has some issues with accessibility but it seems to be a common solution to this problem". The generated image contains a random text.

In that case, Rick chose… Continue reading

As I've read in one of Doug Hennig's great whitepapers, "IntelliSense, added in version 7, was likely the biggest productivity improvement ever added to VFP. It almost entirely eliminates the need to bring up the VFP help, even for little used commands and functions, because of how it provides tips on clauses and parameters in a context-sensitive manner".


When working with an extense library such as GdiPlus-X, Intellisense becomes really very important, because using it we can see easilly all the properties and methods for the current object. At this moment, there's no custom script for… Continue reading


GDI+ brings many possibilities for resizing images. In this short post, I'll show 3 techniques, that can be applied depending on your needs.



All samples below use the new GDIPlus-X library. Get the latest stable release from Codeplex:


Here they are:



Using very few code we can resize any image:

** How To: RESIZE with Thumbnail Technique
** The code resizes an Image to size 60x60
** Saves to a PNG file

DO LOCFILE("System.App")

WITH _SCREEN.System.Drawing

* Variables to store the new Image size
LOCAL… Continue reading