List Info

Thread: Re: Connectors (was koffice)




Re: Connectors (was koffice)
country flaguser name
Germany
2007-02-28 09:23:57
On Wednesday 28 February 2007, Thomas Zander wrote:
> On Wednesday 28 February 2007 07:40, Thorsten Zachmann
wrote:
> > > First (simple) version of connections between
shapes.
> > > This is just playing around, not much in API
stability yet.
> >
> > Cool, but I think a connector should be a flake
shape and not a special
> > kind of object.
>
> I recall we discussed this lightly over the course of
the lifetime of
> flake, and we never said the above. So I'm honestly
surprised that you say
> this.

I allways thought this was the way to go so I never
mentioned it 

> I think the question should be if we want to manipulate
shapes in the same
> way as we want to manipulate connections.
> After all, if you subclass a shape you _add_
functionality, you don't take
> it away. Thats the basis of object-oriented design.
> And I don't think we should be able to move
connections, and the spec even
> says we can't rotate and skew and scale connections
either.

I see no problem here. We also have layers and so on which
are not be able to 
scale and skew. 

I think you want to make it possible to select a connector.
Why should this be 
handled completely different than for shapes. The only
difference is that it 
can not be modified by the default tool.

So you want to implement all that you have for shapes again
for connectors? 
Like commands for delete, adding to the doc. Also when it is
done differently 
we need special code to do saving and loading. 

How do you want to the printing as you need a z-Index also
for the connectors 
to know when they should be painted. The way as you do it
now to print the 
connectors over all other shapes is not really a solution
or? It should be 
possible to have shapes that lay over to a connector. 

Also all the special code for connectors can be removed when
the connectors 
are normal shapes. 

Thorsten
_______________________________________________
koffice-devel mailing list
koffice-develkde.org
h
ttps://mail.kde.org/mailman/listinfo/koffice-devel

Re: Connectors (was koffice)
country flaguser name
Netherlands
2007-02-28 10:28:44
On Wednesday 28 February 2007 16:23, Thorsten Zachmann
wrote:
> On Wednesday 28 February 2007, Thomas Zander wrote:
> > I think the question should be if we want to
manipulate shapes in the
> > same way as we want to manipulate connections.
> > After all, if you subclass a shape you _add_
functionality, you don't
> > take it away. Thats the basis of object-oriented
design.
> > And I don't think we should be able to move
connections, and the spec
> > even says we can't rotate and skew and scale
connections either.
>
> I see no problem here. We also have layers and so on
which are not be able
> to scale and skew.

Just because we already made layers an exception (can not be
selected) is not 
a good reason to make more exceptions.

> I think you want to make it possible to select a
connector. 
Sure, as I said in the wiki page.

> Why should this 
> be handled completely different than for shapes. The
only difference is
> that it can not be modified by the default tool.

Did you read the wiki page? Since that is answered there.
Its suppost to be handled differently because if you select
a connection you 
see the connection options, not the generic shape options.
And it for sure is not the only difference.  In fact, I see
only one thing 
that is similar between shapes and connections. The fact
that they have a 
z-order.
Drawing is different, you can't connect connections, you
can't set the 
background gradient of connections, you can't add
connections to the 
selection (but you can select them ;) etc etc.

> So you want to implement all that you have for shapes
again for connectors?
> Like commands for delete, adding to the doc. Also when
it is done
> differently we need special code to do saving and
loading.

I think if you think the implementation through you'll see
that you can't 
actually share much anyway.
I mean; how many shapes have (upto) 2 other shapes as the
parameter in its 
constructor?

Trust me, I've been thinking about this for a very long
time.
-- 
Thomas Zander

_______________________________________________
koffice-devel mailing list
koffice-develkde.org
h
ttps://mail.kde.org/mailman/listinfo/koffice-devel

Re: Connectors (was koffice)
user name
2007-02-28 10:29:27
I don't think connectors should be shapes.

This is purely by fundamental reasoning. If connectors were
shapes you would 
be able to connect two connectors with a connector. And even
more weird you 
would be able to connect it to itself.

And all this to save some lines of code. A connector is NOT
a shape - it 
connets them. The name kind of implies it.

And the stuff we save is really rather minimal anyway,
because with would 
have to write all sorts of special code to let connectors be
shapes.

If you still insist then I think we should introduce another
class like 
KoWhatWeCallShapeToday which inherit from a new and much
simpler KoShape. 
The KoConnector would then also inherit from the new simple
KoShape.

just my 2 cents worth.

best regards
Casper Boemann 
_______________________________________________
koffice-devel mailing list
koffice-develkde.org
h
ttps://mail.kde.org/mailman/listinfo/koffice-devel

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )