Skip to content
Jeeeyul Lee edited this page Mar 19, 2014 · 16 revisions

V2.1.2

I am almost crazy about platform dependent features on SWT. Especially rendering APIs.

Windows

SWT Path is a way to abstract polygon. It can be used as clipping area. However, in Windows, Clipped area is not anti-aliased even I give SWT.ON to GC.setAntialiasing() I used Path Clipping to fill complex gradient into rounded rectangle. Due to inelegant looks on Windows, I removed all codes that using Path Clipping. Then I created new API that handles complex gradient with rounded area on SWTend.

So, now I have one more reason that why I hate Windows.

Linux

SWT GC has an drawImage method

public void drawImage(Image image, 
    int srcX, int srcY, int srcWidth, int srcHeight, 
    int destX, int destY, int destWidth, int destHeight)

It provides capability to draw image with specified source region and destination region. In linux(GTK), I doesn't works properly except that source area is attached with source images boundary. As you can see in below, Only 4 corner area works properly as source area. I used this API to render shadows of CTabFolder, As a result shadow in Linux seems UGLY! So I had to write NinePath in SWTend without SWT Image API Capabilities.

Linux draw image bug

Mac OSX was the only OS that doesn't make headache on me.

Clone this wiki locally