Surface fills Home About us Contact info Vector graphics SVG Fills & Filters Barcharts Surface fills 3D Pies and Lines Products Price list CSharp translator Dyalog APL2000 Support CUSP CausewayPro RainPro Newleaf Helpstuf Leafhtm Tutorials Demos Climate Charts VML graphics SVG examples Free Stuff CSS Editor Publications Seminars Articles |
Causeway Graphical Systems Using Backlighting and Transparency with a Surface Fill
View this example as SVG (Adobe viewer or Firefox) This is one of my favourite examples. It uses a radial fill on the background to give the effect of back-lighting, and both the title text and the distant surface are semi-transparent to emphasise the effect. TransparencyThis can be achieved directly in the heading, simply by defining a font such as: ch.DefineFont'AX' 'Arial,opacity:0.7' As you can see, this syntax can be used to pass any SVG style attributes directly into the finished page. The gradients are defined in the APL code by the lines: ch.DefineTile 17 '#radial1' ch.DefineTile 23 '#fill1' ch.DefineTile 24 'fill:url(#fill2); opacity:0.25' If you simply provide a URL, RainPro assumes you mean a gradient fill and wraps it for you in the correct tag. If you want a combination (in this case a gradient and transparency are combined) you have to give both attributes in full. Incidentally SVG is case-sensitive here, so be careful to use lower-case for the attribute names. Defining the radial fillThis has a few more options to tweak, but the principle is much the same as the linear fills: This time, is is convenient to use the filled rectangle itself as the co-ordinate system for the radial fill. The bright spot is 25% of the way down (and right) from the top left corner and the fill will scale to fit the shape of the rectangle. This one just runs from a white centre to a Navy background. Note that you can have as many colours in here as you like, for example:
... which is a visual nightmare, but does illustrate the possibilities rather well: SummaryUsed carefully, transparency is a very effective tool when drawing charts with large slabs of colour. It is also a nice trick to play with the title text when this is used on top of a radial-fill backdrop.
Website maintained by adrian@causeway.co.uk Telephone: +44 (0) 1439 788413 | ||
|