This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 44707 - [GTK] PartialEdgeBorder can be more effective
Summary: [GTK] PartialEdgeBorder can be more effective
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 4.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: _ tboudreau
URL:
Keywords: GTK, PERFORMANCE
Depends on:
Blocks:
 
Reported: 2004-06-10 14:58 UTC by _ rkubacki
Modified: 2008-12-22 18:38 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ rkubacki 2004-06-10 14:58:49 UTC
The use of gradient paints in PartialEdgeBorder is
potential performance bottleneck. Also the whole
code is suspicious - it tries to paint several
lines  but I can see only one (that is not well
aligned with shadows next to component).
Comment 1 _ tboudreau 2004-06-26 20:21:51 UTC
The alignment issue is fixed, and the use of transparent colors; re
painting several lines, it should do something like this:

(0 = background color, 4 = shadow color)

0
0
10
20
210
310
321
421
432
432
443
443
444
444

to create a realistic shadow effect.  Probably not the most intuitive
code to read, but much simpler than creating our own Paint subclass.

Not too worried about performance impact with this - GradientPaints
allocate a raster for their pixels, so memory consumption (the thing
that cost us in the memory meter) is proportional to width * height,
and these will never be bigger than 1.6 pixels.  There are more
efficient ways to do this sort of thing, but much more complex.
Comment 2 Marian Mirilovic 2005-07-14 17:44:08 UTC
verified/closed