[Libreoffice-ux-advise] Re-sizing handles ...

Michael Meeks michael.meeks at suse.com
Tue Nov 1 07:16:23 PDT 2011


On Tue, 2011-11-01 at 13:49 +0000, Sveinn í Felli wrote:
> A bit on Bezier-curve handles in Draw:
..
> There's a slight circular shadow effect on the Bezier 
> handles. (Is it possible that they're supposed to be 
> circular but are suffering from the alpha transparency bug 
> mentioned in the other thread ?)

	Yes - and that is fixed in master :-) since it is -such- a trivial fix,
I'll get some review to back-port it to 3.4.5.

	I discovered how to provoke the blinking anchor as well, using ctrl-tab
switches focus between the handles and makes them blink between one
state and another which is interesting.

> Anyway, in most decent drawing applications I know of, 
> Bezier points are circular and Bezier handles either 
> circular or triangular; IMHO that gives a better impression 

	Ah ;-) well, that is another matter, and requires fixing in the code
that actually creates those. A good first step would be finding a kind
German that wanted to translate: svx/inc/svx/svdhdl.hxx:

////////////////////////////////////////////////////////////////////////////////////////////////////

// Jedes Objekt muss in der Lage seine Handles zu erzeugen. Diese werden dann
// bei einer Selektion abgeholt, bei der View angemeldet und sichtbar gemacht.
// Wird ein Handle von der Maus beruehrt (IsHit()), so wird von der View der
// entsprechende Mauszeiger vom Handle abgeholt und der App auf Anfrage zum
// reinschalten uebergeben.
// Handles wie z.B. der Rotationsmittelpunkt oder die Spiegelachse werden von
// der View generiert, wenn vom Controller der entsprechende Transformations-
// Modus selektiert wird.
// HDL_MOVE...HDL_LWRGT muessen im enum immer zusammen stehen bleiben!

enum SdrHdlKind
{
    HDL_MOVE,       // Handle zum Verschieben des Objekts
    HDL_UPLFT,      // Oben links
    HDL_UPPER,      // Oben
    HDL_UPRGT,      // Oben rechts
    HDL_LEFT,       // Links
    HDL_RIGHT,      // Rechts
    HDL_LWLFT,      // Unten links
    HDL_LOWER,      // Unten
    HDL_LWRGT,      // Unten rechts
    HDL_POLY,       // Punktselektion an Polygon oder Bezierkurve
    HDL_BWGT,       // Gewicht an einer Bezierkurve
    HDL_CIRC,       // Winkel an Kreissegmenten, Eckenradius am Rect
    HDL_REF1,       // Referenzpunkt 1, z.B. Rotationsmitte
    HDL_REF2,       // Referenzpunkt 2, z.B. Endpunkt der Spiegelachse
    HDL_MIRX,       // Die Spiegelachse selbst
    HDL_GLUE,       // GluePoint
    HDL_ANCHOR,     // anchor symbol (SD, SW)
    HDL_TRNS,       // interactive transparence
    HDL_GRAD,       // interactive gradient
    HDL_COLR,       // interactive color
    HDL_USER,
    HDL_ANCHOR_TR,  // #101688# Anchor handle with (0,0) at top right for SW

    // for SJ and the CustomShapeHandles:
    HDL_CUSTOMSHAPE1,

    HDL_SMARTTAG
};

	And I guess the ones to change would be:

    HDL_POLY,       // Punktselektion an Polygon oder Bezierkurve
    HDL_BWGT,       // Gewicht an einer Bezierkurve

	With a build going, this is just a bit of experimentation away inside:

	svx/source/svdraw/svdhdl.cxx:

	which has:

            case HDL_POLY:
            {
                if(bRot)
                {
                    eKindOfMarker = (b1PixMore) ? Circ_9x9 : Circ_7x7;
                }
                else
                {
                    eKindOfMarker = (b1PixMore) ? Rect_9x9 : Rect_7x7;
                }
                break;
            }
            case HDL_BWGT: // weight at poly
            {
                eKindOfMarker = Circ_7x7;
                break;
            }

	But I'd prefer to get a completed patch to review for that little lot
that handles the corner cases, and checks where HDL_POLY is used around
the place and whether we want it for all polygon cases, or only beziers
etc.

	HTH,

		Michael.

-- 
michael.meeks at suse.com  <><, Pseudo Engineer, itinerant idiot



More information about the Libreoffice-ux-advise mailing list