Thursday 10 November 2011

XE2 Hotfix for Lion

I just saw a hot fix has been released to fix some issues in Update 2 (found through this Embarcadero blog post by J T.)  It looks like it only affects C++: it fixes a linker error and an error compiling STL containers.

If you use C++ Builder or RAD Studio, this looks worth applying.

As a side note, I only noticed this because I keep a close eye on community blog posts (through DelphiFeeds, a very useful site for collecting multiple sources together.)  Does anyone know if there's a specific feed where things like these hot fixes are announced?  I'm wondering how I would have been supposed to hear about it if I didn't happen to have seen it mentioned in a blog.

Tuesday 8 November 2011

Transparent graphics with pure GDI (Part 1 1/2)

Last post, I said that the next part of my transparent graphics series would be Part 2, and would introduce a class I've written to simplify drawing to glass, drawing partially transparent shapes and text, etc.

I haven't posted this yet, simply because life has got in the way - since my last post, I spent a couple of weeks back home in Australia visiting friends and colleagues, and traveling a bit on the way back here.  (I went camel-riding.  They're surprisingly weird animals.)  I'm afraid I simply haven't had time to write the article and to polish the final bits of the library code.

Part 2 really is coming, and I'm sorry it's taking so long.  In the meantime, here is a quick post, Part 1 1/2, addressing a couple of questions asked in the comments for Part 1.

Thursday 13 October 2011

Transparent graphics with pure GDI (Part 1)

Transparent graphics are used everywhere these days.  Half the UIs you will have used today will have made some use of composited graphics, overlays, or something similar.  You've probably seen:
  • Selections with transparent rectangles or other shapes
  • Text with a transparent shape behind it, so you can see the through to the background and still clearly read the text
  • Custom drawing on glass, such as text with the blurred white background and custom controls
How do you achieve all of these with Delphi or C++Builder?

This is part 1 of a short series that examines alpha-aware graphics using native GDI only - not GDI+, not DirectX, and not with any other custom non-GDI graphics implementation.  By the end of the series I will have introduced a small alpha-aware canvas class that you can use to draw standard shapes (rectangles, ellipses, etc) just as you can with the normal TCanvas (and using standard TFont, TPen and TBrush objects), to compose several layers of alpha blended graphics together, and to draw on glass on Vista and Windows 7.

This is a screenshot of the demo program which I used to test this class.  It's not the prettiest demo program ever, but you can see all of the above in action in this screenshot:


Sunday 11 September 2011

Delphi-tage 2011, Cologne


Hullo from Cologne!  Yesterday I attended the Cologne stop in the Delphi World Tour.  There were over 250 attendees, and they sold out all their tickets:
Delphi-Tage about to begin

Tuesday 6 September 2011

C++ Builder XE2

Welcome!  This is the first article on my new blog, and it examines XE2.  I’ll dig right in:
First impressions
XE2 uses the same installer as previous versions, and has a fairly simple setup process.  For some reason the help uses a separate installer and so installation isn’t ‘set it and forget it’ – you’ll come back thinking it’s done to find you need to click Next a couple of times and wait for another five minutes.
The first thing I noticed when installing is that the installation components include a cross-platform option!  This is a promising start.  More on cross-compilation below.
When installed, the IDE starts up much faster than 2010.  To be fair, I’ve installed C++Builder XE2 and am comparing it to RAD Studio 2010, so it is probably missing a lot of the packages that the full RAD Studio includes.  The IDE looks identical to 2010 (the last version I used.)  It still uses plain Windows styles.  I’ve been hoping for it to look a little jazzier sometime – Visual Studio is visually very slick, and people, even programmers, do form impressions based on looks.  Embarcadero (then Codegear) played with this briefly for 2006 and 2007, when the toolbars in the IDE were rounded Office-style.  Unfortunately they moved back to unthemed controls.  The new VCL styles provided in XE2 (more on these below) provide a good opportunity for easy slickification of the base IDE, and using them in the IDE would have been a good demonstration of the versatility and robustness of the style engine.