Archives

Archive for September, 2010

Sep 30th

Using AGG with buffered paint

2010
No comments | 1557 views

In the last article, I explained how to render to a Windows device context, using the AGG 2d graphics library. As promised, I want to explain how to do it when using the Buffered Paint API, available on Windows Vista or later.

Buffered paint is a set of new APIs allowing an application to perform flicker free painting without the overhead of creating memory device contexts and bitmaps. It is only available on Windows Vista or later and is part of the UxTheme library. Using it will either make your application incompatible with Windows XP or earlier or will require using the GetProcAddress() method on Vista or later while providing a fallback method when the buffered paint API is not available.

Read more...

2 Likes Like
Tags: ,

Sep 24th

Rendering to a device context with AGG (AntiGrain)

2010
No comments | 1824 views

Quite a few years ago, I discovered AntiGrain Geometry, a high-performance, high-quality, platform-independent generic library for rendering 2d vector graphics.

AGG is fast, lightweight, implemented as a set of C++ classes, makes heavy use of templates and is fairly easy to integrate into a project. There is no need to build and link against libraries as you just add the files to your project and make sure you include the necessary headers. Clean and simple.

It can serve as a replacement for GDI+ and usually produces better results at higher speeds. It is also somewhat similar to cairo graphics, but has less features. It is perfect when you need to draw filled or outlined shapes, deal with all kinds of gradients or draw antialiased lines.

Read more...

2 Likes Like
Tags: ,

Sep 23rd

When you are a developer and use WordPress…

2010
1 comment | 2715 views

Every now and then, you stumble over something you did not realize that it exists even though it's so obvious that something like it _must_ exist :)

As a developer, you sometimes need to post source code in your blog. Reading source code can be exciting and rewarding but it can be a pain when the code is not properly formatted. Syntax highlighting is a nice method to improve source code readability and is practically supported by every single development tool that can be used to read or edit code.

It makes sense, because reading highlighted code is a lot easier (and, as a side effect, it also looks better), so naturally, you want this feature to be available when you are frequently posting source code on the web. Read more...

1 Like Like
Tags:

Sep 14th

Updated the Chrome-like tabs style for Firefox 4 / beta

2010
2 comments | 5866 views

Chrome-like tabs in Fx4

I've updated my style which creates a chrome-like tab strip and tweaks some more things for Firefox 4 beta. The original post can be found here. A few changes were necessary to keep up with changes in Firefox 4 itself, especially changes in the drawing of the title bar and the orange app button.

Some minor updates only

Please read the notes before installing it. You'll definitely need a very recent build of Firefox 4 and the style is designed to work best on Vista or 7 with the Aero theme active. Also, it is not intended to be used with a persona theme (a.k.a. lightweight theme), because the tabs are not transparent enough to look good with a persona theme.

Where to get it?

The style is available from userstyles.org.

Original post

This post describes the style in more detail. Most things are still valid with the exception of the combined stop/reload button. This is now a default feature in Firefox 4 and a user style is no longer needed to implement it.

1 Like Like
Tags: