-
Notifications
You must be signed in to change notification settings - Fork 121
Development Log
I am almost crazy about platform dependent features on SWT. Especially rendering APIs.
SWT Path is a way to abstract polygon. It can be used as clipping area.
However, in Windows, Edges of 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.
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 NinePatch in SWTend without SWT Image API Capabilities.
Mac OSX was the only OS that doesn't make headache on me.
I'm pretty sure that CTabFolderRender
is not intended to be extend by 3rd party. Because so many things are tightly coupled.
For instance, There is no way to customize toolbar(on the top right corner in CTabFolder) background. Default implementations has a bug that when tab header height is not minimal value, background gradient of toolbar is not match with header's one.
CTabFolderRenderer
, CTabFolder
and CTabItem
co-operates with so many package visible APIs.
So I had to create a xtend extension that abstract and hide hack elegant.
CTabFolderRenderer
also have package visible methods, that I can't override.
So I had to use various hacknologies.