Re: How do they do that?!?



On 16 Mar, Richard Caldwell scribbled:
->  "Fox, Kevin M" wrote:
->  
->  > gtk.themes.org
->  > get the gradient theme
->  
->  The gradient theme looks great.  The only problem is when needs to stretch a
->  relatively small gradient across the entire background of a window.  The
->  results are jagged and ugly.  Tiling a diagonal gradient isn't an option and
->  creating a larger pixmap would eat memory.  Would it be any more efficient
->  if gtk-engines could generate it's own gradients the way Window Maker does
->  for title bars?
actualyl using a larger pixmap woudl use the same memry as the gradient
is turned intoa pixmap - if thre original image is bigger or smaller
the pixmap uses the same amount of ram - if the gradient is generated
by code the pixmap still uses the same amount of ram...

if you want a HIGH resolution pixmap use a 64x64 or so tiled gradient
image - this will give good scaling resuults and use only 13Kb of ram
for the original image -t he pixmaps once scaled will use the same
amount of ram regardless of the original size of the image or if its
generated.

you are falling into a commonly held fallacy that the memory required
is soleley dependant ont he input data not the output - the output
pixmap cosume the VAST VAST VAST majority of the data (1 640x480 window
wiht a scaled background pixmap in 16bpp for the pixmap - if its an
image, calculated gradient or a small image scaled up or what not will
consume 614Kb of server ram - so a 64x64kb original image that MANYH
such pixmap are all generated form is only 13Kb - NOTHIGN  in
comparison to the output pixmap data).


-- 
--------------- Codito, ergo sum - "I code, therefore I am" --------------------
raster@rasterman.com       /\___ /\ ___/||\___ ____/|/\___  raster@redhat.com
Carsten Haitzler           | _ //__\\ __||_ __\\ ___|| _ /  Red Hat Advanced
218/21 Conner Drive        || // __ \\_ \ | |   \ _/_|| /   Development Labs
Chapel Hill NC 27514 USA   ||\\\/  \//__/ |_|   /___/||\\   919 547 0012 ext 282
+1 (919) 929 9443, 801 4392   For pure Enlightenment   http://www.rasterman.com/

              \|/ ____ \|/  For those of you unaware. This face here is in fact
	      "@'/ ,. \@"   a Linux Kernel Error Message.
	      /_| \__/ |_\
		 \__U_/
							   



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]