Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Where is Tk_GetDash documented?

by rcseege (Pilgrim)
on Nov 19, 2005 at 02:56 UTC ( [id://510023]=note: print w/replies, xml ) Need Help??


in reply to Where is Tk_GetDash documented?

I really hate to ask this, but did you miss the DASH PATTERNS section in the Canvas docs? I'll reproduce it here for speed:

DASH PATTERNS

Many items support the notion of an dash pattern for outlines.

The first possible syntax is a list of integers. Each element represents the number of pixels of a line segment. Only the odd segments are drawn using the ``outline'' color. The other segments are drawn transparant.

The second possible syntax is a character list containing only 5 possible characters [.,-_ ]. The space can be used to enlarge the space between other line elements, and can not occur as the first position in the string. Some examples:

-dash . = -dash [2,4] -dash - = -dash [6,4] -dash -. = -dash [6,4,2,4] -dash -.. = -dash [6,4,2,4,2,4] -dash '. ' = -dash [2,8] -dash ',' = -dash [4,4]

The main difference of this syntax with the previous is that it it shape-conserving. This means that all values in the dash list will be multiplied by the line width before display. This assures that ``.'' will always be displayed as a dot and ``-'' always as a dash regardless of the line width.

On systems where only a limited set of dash patterns, the dash pattern will be displayed as the most close dash pattern that is available. For example, on Windows only the first 4 of the above examples are available. The last 2 examples will be displayed identically as the first one.


Updated: Whoops! I should have read PerlBear's link a bit more closely...

Replies are listed 'Best First'.
Re^2: Where is Tk_GetDash documented?
by BrowserUk (Patriarch) on Nov 19, 2005 at 04:28 UTC
    I really hate to ask this ...

    Don't. It's a perfectly fair and reasonable question. Yes, I did miss that section before posting.

    Essentially, I wasn't looking for it because I didn't know it existed. The Canvas docs are sufficiently large that I tend to search for stuff (Arc, Oval, Line etc.) rather than scrolling through linearly.

    I was looking for wherever Tk_GetGash was documented, as directed by the section of the Canvas docs I was referencing. First I searched the Canvas doc and found half a dozen references, but they are all references to it. None with an explanation.

    Then I grepped the docs directories and found all the same ones in the Canvas doc, and one other that was also a reference to, not an explanation of either the information or where to find it.

    If all those references to Tk_GetDash were links or references to the "Dash Patterns" section, I wouldn't have had the problem :).


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://510023]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2024-04-19 12:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found