Delphi Graphics Programming knowledge base - articles, tutorials, tips and techniques.
In the process of writing a diary/planner (PIM) type application, I came across the need for a year planner. You know the kind of thing, much like a full year calendar showing ALL the days for ALL the months of a given year. Here's a step-by-step to creating your own year planner in Delphi. Full source code included.
To draw graphics in a Delphi application, you draw on an object's canvas, rather than directly on the object. The canvas is a property of the object, and is itself an object. Wanna learn more about the TCanvas properties and mehods? Meet "Symmetric Canvas Drawing" - a tool to teach 6th formers about using the canvas and drawing on it in Delphi.
Here's an idea for your next application: create a "form picker" to let users easily select and navigate through open forms by displaying thumbnails of them all in a dialog window. Let's first see how to create a thumbnail of a form image.
Changing the Windows display mode settings (resolution and color depth) from Delphi code. Plus: how to handle the WM_DISPLAYCHANGE Windows message sent to all windows when the display resolution has changed.
Working with GIF images in Delphi. Need to display an animated GIF image in a Delphi application? Even though Delphi does not natively support GIF image files formats (like BMP or JPEG) there are a few great (free source) components available on the Net, which add the ability to display and manipulate GIF images at run as well as at design time to any Delphi application.
Convert between graphics formats, draw on Desktop, grab screen shots, rotate, fade, grayscale, ...
Here's how to take a screen shot of the Desktop window including the mouse cursor, using Delphi code.
Custom shaped forms, a funny way to distinguish yourself from the others! Plus: custom shaped buttons and various form enhancements.
Delphi Programming concepts of Double Buffering, technique that is used to prevent flicker when drawing onto the screen.
From simple lines to direct API calls: the ultimate tutorial to GDI graphics in Delphi. This tutorial will introduce you to some of the techniques in the GDI Delphi drawing. Look for: drawing lines and shapes, drawing pictures, flicker-free drawings, off-screen bitmaps, GDI drawings the API way...
Changing the display mode settings (resolution and color depth) from Delphi code.
Write an application that is able to zoom in portion of your desktop screen, like a loope.
Acquire images from scanners, cameras and image capture devices using Delphi. See how to import (and wrap in a component) an image scan control within Delphi.
Delphi code that divides the current desktop into blocks and then swaps the blocks. It includes an option that lets you adjust the shuffling speed, and the size of the blocks. Great intro to sliding puzzle game or to screen saver development.
Find out about the number of colors available for a given canvas.
[ftp|.pdf ~ 1.9 MB] This bonus chapter for
Mastering Delphi 5 includes painting on a form, animated buttons, an image viewer, drawing over a bitmap, graphical grids and games, using a Tee Chart, and Windows metafiles.
Find out about. "Rotation of a graph is done by rotating the vectors. An image is rotated by rotating the pixels."
Fractal landscape generation, 3D perspective transformations, fixed point arithmetic, and Delphi TCanvas graphics.
Lear how to use the TCanvas and TShape objects to draw simple geometric forms to the screen. Plus more about using colors, calculating coordinates, and working with rectangles and ellipses. Chapter 5 of "Delphi Unleashed 1.0: 16 Bit"