|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
Rainer
Joined: 13 Mar 2006 Posts: 43
|
Posted: Mon Aug 28, 2006 8:54 am Post subject: SET_LINE_STYLE@ |
|
|
Hi,
I'm displaying frequency polygons made up of lots of small lines. Unfortunately these curves are hard to distinguish, even when using different line styles. For example a curve of dashed lines will only differ in appearance from a curve of solid lines if a single line is long enough for the dashing to matter graphically. For a very short line dashing won't be visible and a curve out of dashed lines will appear solid.
Now I discovered the PS_ENDCAP_XXX options. It says in the "SET_LINE_STYLE@" chapter of the tutorial that they must be used with the "PS_GEOMETRIC" style. However, this is the only reference of that word in both the tutorial and the printed Clearwin+ book. Also, the chapter doesn't explain how to combine options.
Further down there is a mention of "PS_INSIDEFRAME" being able to be "ORed" with the other values. But I'm not sure how this would work or how this would apply to the above problem.
So my questions are:
1.) What can be done in general to distinguish the curves in the above situation ?
2.) What is "PS_GEOMETRIC" ?
3.) How can options be combined ?
Thanks
Rainer |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Mon Aug 28, 2006 1:30 pm Post subject: SET_LINE_STYLE@ |
|
|
Rainer
When using PS_GEOMETRIC the library makes a call to the Windows API ExtCreatePen. If you look up ExtCreatePen on the Microsoft website you will find detailed information about the line styles (just type ExtCreatePen into Google).
For short lines the end cap styles will not be relevant. My guess is that you will need to use narrow lines that are dotted, using various colours.
You can look up the values of the style parameters (PS_GEOMETIC etc) either on the Microsoft website or in win32api.ins. Usually they are bit values (1,2,4,8, etc) so they can be ORed by simply adding the styles together. Alternatively you can use the Fortran 90 intrinsic IOR.
|
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Wed Aug 30, 2006 2:49 pm Post subject: SET_LINE_STYLE@ |
|
|
Paul, Rainer,
Does set_line_style@ restart a dash for every vector, but not when a polyline is called? I'm too busy to try it out, but I remember this from other graphics systems, so that in a complicated polyline you do get to see the dashes and gaps - and some very short vectors are "all gap", some are all dash, and some have bits of both.
I had to remind myself what a frequency polygon was, but you will be aware that others differentiate the traces of multiple overlaid polygons not so much with the line type, but with the line colour and the symbols drawn where the data_values/ salient_points are (square, diamond, circle, etc) which may be filled with colour or simply outlined (e.g. as in MS Excel charts). Having a play around with Excel charts is likely to show you more easily what does and does not work. I suspect that dashed lines are not only not very good in Windows, but that what a good draughtsman does without thinking is difficult to emulate in a program. Mind you, the draughtsman using a pen and ink has to work around the problems of monochrome, whereas even the meanest computers offer colour these days ...
I learnt a lot from Edward Tufte's books (http://www.edwardtufte.com/) on the subject of graphical presentation of info. If Rainer finds himself anywhere near Kingston upon Thames he's welcome to borrow my copies. Tufte regards some of these embellishments to graphs as "chart junk", and advocates that "less is more", i.e. draw less, show more.
Eddie. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|