On Mon, Jun 23, 2008 at 7:52 PM, Maximilian Albert <Anhalter42@...173...> wrote:
How can I add images/paths to dropdown menus, e.g., to illustrate the shape that is going to be applied as a PatternAlongPath LPE?
I'd like to save the various possible shapes for dropdown menu #6 (cf. the image in the blueprint) in a separate file and read them during runtime rather than to hard-code them in advance. How can I access their path information from my code so that they can be applied as a PatternAlongPath?
Both these questions are answered by the marker menu code in fill&stroke. It's all a little cumbersome (creating a sandbox document, copying the shape to it, rendering it to a bitmap, addiing bitmap to the menu) but it works.
- For the LPE experts (Johan in particular :-) ): Valerie suggests that the width of the shape can be controlled via two spinbuttons. When I apply a given shape to a path (using PatternAlongPath), does the width of the resulting LPE-item depend on the length of the path or is it independent of this length (i.e., does the resulting item become wider when the path is longer and thus the pattern is "stretched" more)?
By default it's 100% of the original width of the pattern. In this case, however, I think the expected behavior is for the path to reproduce the thumbnail of the profile as closely as possible, including its length/width ratio, i.e. you should set "width in terms of length". Or maybe the initial width must correspond to the stroke width of the path before profile is apllied, if it had any stroke.