[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: text-on-shapes and EnhancedPathShape's text-areas attribute
From:       Thorsten Zachmann <t.zachmann () zagge ! de>
Date:       2010-09-21 5:28:35
Message-ID: 201009210728.36190.t.zachmann () zagge ! de
[Download RAW message or body]

On Monday 20 September 2010 22:37:11 Marijn Kruisselbrink wrote:
> > My comments on these options;
> > a) The design should look pretty straight forward. Easy to implement.
> > On the other hand it looks like overkill and its following ODFs mess of
> > entanglement. Just one shape type can use this and that one is not even
> > in flake itself, sounds odd to have a property for that.
> 
> Yeah, this would not be the nicest way to implement this, but certainly
> the  most straightforward. Either of the other options seems to rather go
> against the whole decoration pattern by having to make the
> enhanced-path-shape aware of if it is being decorated by a
> KoTextOnShapeContainer (which might not even be the first parent if
> multiple decorators are in use), which would make the code in that place a
> lot more complicated (and fragile).
> Adding interface for this to KoShape also would seem to be more in line
> with  making the API more powerfull and potentially usefull than what
> potentially can be stored in odf. Odf might not support custom text areas
> for shapes besides the enhanced-path-shape, but no reason to limit flake
> to that I would think? Various shapes probably will have different
> algorithms to actually calculate their text area of course.

There is also a different use case where the area of the TOS and the shape 
should be different, e.g. if you have a horizontal line and there is text on 
the line this does not yet work as the area of the line has no height and 
therefore the TOS has no height too. This results is that the text is only 
shown partly. However in this case the text should grow.

There are more special cases where special handling would be needed e.g. if 
there is a line in a 45° angel also the text should be in the angle of the 
line and not horizontal.

Maybe this can be taken into consideration when extending the current design.

Thorsten
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic