[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: text-on-shapes and EnhancedPathShape's text-areas attribute
From: Marijn Kruisselbrink <m.kruisselbrink () student ! tue ! nl>
Date: 2010-09-20 13:28:13
Message-ID: 201009201528.13414.m.kruisselbrink () student ! tue ! nl
[Download RAW message or body]
Hi all,
Currently KoTextOnShapeContainer always creates a text shape that is the same
size as the shape it is wrapping. However this is not always correct. For
draw:enhanced-geometry type shapes (EnhancedPathShape) there could be a
draw:text-areas attribute specified, which specifies where exactly on the
shape the text area should be (with possible different text areas depending
on style:writing-mode). This is used for example in shapes with rounded
corners and things like that to have the text properly positioned inside the
shape.
So somehow there would need to be some API for KoTextOnShapeContainer to
figure out what area the textshape should have (or for EnhancedPathShape to
tell KoTextOnShapeContainer this).
To make it even more complicated, if a user moves around one of the handles of
an EnhancedPathShape, the text area can change, and thus somehow
EnhancedPathShape will need to be able to notify KoTextOnShapeContainer about
this change.
The first part of this problem could be solved by adding a virtual QRectF
textArea() method to KoShape, although I'm not sure if that would be the best
solution. The second part is a bit harder, and I don't really have any ideas
at the moment how that could be best solved using the current
KoTextOnShapeContainer design. If KoShape would be a QObject adding a signal
to it for this purpose would work, but that's not really a nice solution (and
KoShape is not a QObject, so it's not an option anyway).
So, anybody got suggestions on how to add this possibility to the current
text-on-shape support?
Marijn
_______________________________________________
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