Re: Advanced options for custom shapes



Dear Hans Breuer,

Thanks for your reply.

This would require some extension to the custom shape specification [1] and 
the custom shape module [2]. A simple solution could be to define an enum 
with the shape and use that for conditional rendering of subshapes. This 
wont give an extra dialog, but just another option with the standard 
properties.

As I tried to put forward in my email I have experimented with custom
shapes, although I wasn't aware of the enum functionality. Observing the
UML objects (especially the class) in the source code has shown me the
incredible number of possibilities for adding options. It would present
some learning-curve though, since I have little experience in
programming for desktop applications. As soon as I find some time I can
begin, now that I know where to begin.

If I understand correctly this is a special case of 1)? But here one might 
consider to use the SVG switch element [3], which looks to be too limited 
for the generic case. But again some specification and implementation 
updated would be involved.

I wasn't able to find any <switch> statement in the code (grep), so I
assume this would imply not only an element for each shape, but also the
necessary parsing in the code to properly handle this functionality.
That seems to require to much effort, especially for a questionable
usability feature.

This kind of flexibility is IMO out of scope for the custom shape 
mechanism. But an an object implementation in C could achieve something 
like that. See e.g. "Network - Bus" for an example [4].

Another good example. The Connection point in Electrical would be a more
simple way of achieving similar drawing capabilities, but the network
bus with some modifications would be a great alternative.

Custom shapes are always scaled so the underlying size does not matter 
match. If you are creating your shapes with the help of Dia's shape 
exporter typical diagram sizes should be used.

The main reason for asking was the consideration of the relative line
thickness when designing shapes. Then again line thickness can be
defined by the user.

That file produces errors on load with master and dia-0-97

  * Unknown types while reading diagram file CMOS - nmos_h
  => expected because of missing shape file

  * Error? trying to connect a non connectable handle.
    'Standard - Ellipse' -> 'Standard - Ellipse'
  => This might be a bug with Dia, so I'm curious how the diagram got 
created. Did you already modify the Dia source code? Which version did you 
use to create the file?

I was aware of these, which originate from using other sheets as a
starting point. Nonetheless the other elements show my attempt.

If I've understood your requirments correctly some coding woud be 
inevitable. Don't hesitate to discuss the design on this list first ;-)

Great, I'll start by preparing a set of icons I would like to implement
and the various options, to better discuss the way of implementing.

Thanks again,
Nico Rikken

Attachment: signature.asc
Description: This is a digitally signed message part



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