You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by vyang <vy...@apt-cafm.com> on 2008/07/18 16:31:32 UTC

PanInteractor with toggle button

Hello,

Is there a way to emulate a shift pressed link to a toggle button.  What I
want to do is allow the user the option of panning the canvas with a toggle
button as well as with the shift key.  
-- 
View this message in context: http://www.nabble.com/PanInteractor-with-toggle-button-tp18530577p18530577.html
Sent from the Batik - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: Improving font display

Posted by Helder Magalhães <he...@gmail.com>.
> Which setting would I use to make small fonts appear smooth?
Not sure if I understand the "small fonts" here. You sample states 15
units, which makes me wonder if it is your coordinate system which is
making them small. SVG has the "text-rendering" property [1] which may
be what you are looking for...?


> The svg has decent amount of text displayed on click events and the font
> appear as if typewriter was used.
> My settings are basic
> font-family:verdana;
> font-size:15;
> stroke:black;
> stroke-opacity:1;
> stroke-width:1;
Using stroke will cause the glyphs to be made bolder - can this be the
cause for the "typewriter" behavior experienced? I suggest setting
text "stroke" to "none" and using "fill" instead. This will
inclusively bring some performance gains.


Regarding both suggestions, checkout SVG Secrets [2], (with special
emphasis on) sections "Stroke vs. Fill" and "Stroke vs. Fill". ;-)

Hope this helps,

 Helder Magalhães

[1] http://www.w3.org/TR/SVG/painting.html#TextRenderingProperty
[2] http://www.svgopen.org/2002/papers/sorotokin__svg_secrets/

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Improving font display

Posted by Nirmesh Desai <nd...@autonomy.com>.
Which setting would I use to make small fonts appear smooth?

The svg has decent amount of text displayed on click events and the font
appear as if typewriter was used.

My settings are basic
font-family:verdana; 
font-size:15;
stroke:black; 
stroke-opacity:1;
stroke-width:1;

Thanks for all the help,
Nirmesh

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: PanInteractor with toggle button

Posted by th...@kodak.com.
Hi Vyang,

"Helder Magalhães" <he...@gmail.com> wrote on 07/20/2008 
04:25:28 AM:

> > Sorry, I wasn't clear enough.  What I wanted to do was to emulate the 
shift
> > press using a toggle button.

> I guess you were clear enough but I emulating shift doesn't seem a
> good approach as you may disrupt you own contents (for example, if
> shift key events are to to be processed at some point).

   I'm with Helder here.  Trying to muck with the system events seem
like it will cause all sort's of oddness.

> > With this I can use the interactor that is
> > already loaded in JSVGCanvas without creating and adding another 
interactor
> > to the canvas.
> I keep my suggestion (and provided link), although it will require the
> changes you apparently want to avoid (adding a custom interactor and
> possibly remove the existing shift-based one).

   Right I would replace the current pan interactor with a new one
that checks for your check box in addition to the shift key, in
it's startInteraction method.

Re: PanInteractor with toggle button

Posted by Helder Magalhães <he...@gmail.com>.
> Sorry, I wasn't clear enough.  What I wanted to do was to emulate the shift
> press using a toggle button.
I guess you were clear enough but I emulating shift doesn't seem a
good approach as you may disrupt you own contents (for example, if
shift key events are to to be processed at some point).

> With this I can use the interactor that is
> already loaded in JSVGCanvas without creating and adding another interactor
> to the canvas.
I keep my suggestion (and provided link), although it will require the
changes you apparently want to avoid (adding a custom interactor and
possibly remove the existing shift-based one).

Hope this helps,

 Helder Magalhães

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: PanInteractor with toggle button

Posted by vyang <vy...@apt-cafm.com>.
Hello,

Sorry, I wasn't clear enough.  What I wanted to do was to emulate the shift
press using a toggle button.  With this I can use the interactor that is
already loaded in JSVGCanvas without creating and adding another interactor
to the canvas.

vyang


Helder Magalhães wrote:
> 
>> Is there a way to emulate a shift pressed link to a toggle button.  What
>> I
>> want to do is allow the user the option of panning the canvas with a
>> toggle
>> button as well as with the shift key.
> 
> There's some quick documentation on the subject [1]. :-) Why not
> expand the Wiki section if/once you are able to do that? Maybe
> uploading a quick demo or a code snippet would be a great sample
> IMO... ;-)
> 
> Hope this helps,
> 
>  Helder Magalhães
> 
> [1] http://wiki.apache.org/xmlgraphics-batik/CanvasInteractors
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/PanInteractor-with-toggle-button-tp18530577p18533993.html
Sent from the Batik - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: PanInteractor with toggle button

Posted by Helder Magalhães <he...@gmail.com>.
> Is there a way to emulate a shift pressed link to a toggle button.  What I
> want to do is allow the user the option of panning the canvas with a toggle
> button as well as with the shift key.

There's some quick documentation on the subject [1]. :-) Why not
expand the Wiki section if/once you are able to do that? Maybe
uploading a quick demo or a code snippet would be a great sample
IMO... ;-)

Hope this helps,

 Helder Magalhães

[1] http://wiki.apache.org/xmlgraphics-batik/CanvasInteractors

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org