Delphi


Drawing fully justified text to a canvas 1

At some point we’ve probably all written code to draw text to screen manually, using TextOut, ExtTextOut, DrawText or DrawTextEx depending on how complex the required result was. But have you ever tried to draw fully-justified text, that is, text that adheres to both the left and right boundaries of the destination rectangle? There’s no support […]


TFireMonkeyContainer bugfix for instances created at runtime

TFireMonkeyContainer is a small open-source VCL component that can host a FMX form, allowing you to embed FireMonkey forms inside your VCL application. A 3D FireMonkey form embedded in a VCL application, using TFireMonkeyContainer This post is to note a bugfix that handles the case where instances of TFireMonkeyContainer are freed in a different order […]


Mysteries of IDE plugins: Painting in the code editor (Part 1) 16

Part 1 of a series on how to write an IDE plugin that can paint on the IDE code editor line-by-line along with the code. Introduction: IDE plugins IDE plugins are a mysterious topic.  With little official documentation, most material is scattered across a variety of blogs and websites, often out of date and referring […]


Useful reference about disabling specific compiler warnings

Earlier today while working on an IDE plugin, I got the following compiler warnings: [dcc32 Warning] W1029 Duplicate constructor ‘TLineDifference.CreateEqual’ with identical parameters will be inacessible [sic] from C++ [dcc32 Warning] W1029 Duplicate constructor ‘TLineDifference.CreateAdded’ with identical parameters will be inacessible [sic] from C++ This is caused by a record type having two or more constructors taking […]


DWS Mandelbrot Explorer Mark II, and random notes about FireMonkey and threads 11

The DWS Mandelbrot Explorer, which renders tiles generated by Eric Grange’s tile server, has been updated.The following is a braindump of information about the app, about FireMonkey, about threading, and about how they all interrelate. I think some points will be interesting to you. Miscellaneous things I’ve learned It turns out that you cannot reliably […]


A unit to enable Direct2D in FireMonkey where possible 2

A few days ago I posted about FireMonkey’s choice of canvas classes, where it would choose to render via GDI+ instead of via Direct2D.  There were two fixes: one (untested and possibly dangerous) enabled hardware rendering on DirectX9-class hardware, but required editing the FireMonkey source; the second (known safe and tested) enables optimised software rendering […]


FireMonkey canvas classes and a bugfix to speed up your apps 14

Everything you need to know about FireMonkey canvases – and a performance boost bugfix for some people as well! I recently posted my first real-world FireMonkey app, which gave a zoomable, scrollable, very interactive view of the Mandelbrot fractal using the precomputed DWS Mandelbrot tiles. It worked fine on my computer. Those are famous last […]


A FireMonkey client for the DWS Terapixel Mandelbrot data set 12

You may have seen Eric Grange’s precomputed Mandelbrot set data – read the Christmas announcement and the followup. He has generated and is hosting the fractal as a multi-level tiled data set: that is, as a structure of varying levels of detail, where each level of detail is twice as large as the one before. His […]


TTransparentCanvas: changing the background color of glowing text 3

You have probably already seen how to use DrawThemeTextEx on Vista and above to draw text with a white blurry ‘glow’ effect behind it. It’s commonly used when drawing on glass, to ensure that text has enough background contrast to be easily readable. But the API only draws a white glow. What if you want […]


TFireMonkeyContainer update: bugs fixed, features added 7

The example application showing a 3D FireMonkey form. On the other tab is a standard 2D form. On Wednesday I announced TFireMonkeyContainer, a VCL control that can host a FireMonkey form, allowing you to mix FireMonkey elements into your VCL app. It was (and is) a new project, and the announcement page listed several known […]