Difference between revisions of "Draw: set Adjustment Values for Custom shapes"
(→API Analysis) |
(→Design option) |
||
Line 51: | Line 51: | ||
The adjustment value of the smile is in degrees. | The adjustment value of the smile is in degrees. | ||
+ | |||
+ | == Difficulties == | ||
+ | Beyond the programmation, I see some difficulties : | ||
+ | * No information about value is available. Hard to know which value set specific handle. | ||
+ | * No tag or text is available through API to design dialog fields. | ||
== | == | ||
[[Category:User Experience]] | [[Category:User Experience]] |
Revision as of 16:46, 13 August 2012
Introduction
See Issue 120519
Many shapes like ring, smiley or callout had a yellow handle to modify a specific parameter.
But it only set up with mouse. It unable to set up with a dialogbox if you need a fine adjustment.
Custom shape
These shape are designed by a specific handle (yellow colored).
Each shape can have one or more yellow handles.
Some shapes with one handle
Some shapes with two or more handles
API Analysis
If you inspect the SvxShapeText object through API, you have a CustomShapeGeometry property.
- This property result a structure of 6 arrays com.sun.star.beans.PropertyValue.
- The 3th array is named AdjustmentValues
- This structure contains a variant named Value
- This Value is a com.sun.star.drawing.EnhancedCustomShapeAdjustmentValue structure
- Depending on the number of handles, the number of structures varies.
- Each structure contains a default Value (type variant).
Default value of shape with one handle:
- For a ring shape, the default value is: 5400
- For a smiley shape: 17520.
- For a frame shape: 2000.
Default values of shape with more handles:
The "left-right-arrow-callout" with 3 yellow handles match to 4 structures:
- Array(0): 5400
- Array(1): 5500
- Array(2): 2700
- Array(3): 8100
Design option
Proposal of a new design for "Position and size" dialog.
A specific tab will be added. It is much easy to set up these values in dialog.
Sample dialog for smiley shape:
The adjustment value of the smile is in degrees.
Difficulties
Beyond the programmation, I see some difficulties :
- No information about value is available. Hard to know which value set specific handle.
- No tag or text is available through API to design dialog fields.
==