These changes are in Savannah SVN since revision r39 .

On Thu, Apr 8, 2010 at 12:05 AM, Steven Rubin <[email protected]>wrote:

>  At 09:07 AM 4/5/2010, you wrote:
>
> Dear Electric developers,
>
> IMHO measurement procedure in layout window needs to be improved.
> At first it would be better if the marker would move interruptedly in
> accordance with
> Display Grid Preferences minimum size. In this case it would be easier to
> hit into the
> starting and finishing points of the measurable segment. Now the market
> moves
> continuously and it is difficult to hit into the predeterminated position.
> Next the marker for measurements is too sophisticated that causes
> uncertainty which end
> of it should be used.
>
>
> I have fixed this in the internal version of Electric.  Here is what I did:
>
> (1) I changed the measurement icon so that it looks like a tape-measure.
> It is more obvious which is the pointer end.  I will attach a GIF file of
> the icon, which should replace both:
>
> com.sun.electric.tool.user.ui.resources.ButtonMeasure.gif      AND
> com.sun.electric.tool.user.ui.resources.CursorMeasure.gif
>
> (2) I added code to com.sun.electric.tool.user.ui.MeasureListener.java so
> that it snaps the cursor during measurement.  To do this, I added this
> method:
>
> -----------------------------------------------------
> private void gridMouse(MouseEvent evt)
> {
>     // snap the cursor to the grid
>     if (evt.getSource() instanceof EditWindow)
>     {
>         EditWindow wnd = (EditWindow)evt.getSource();
>         int mouseX = evt.getX() + gridOffX;
>         int mouseY = evt.getY() + gridOffY;
>         Point2D dbMouse = wnd.screenToDatabase(mouseX, mouseY);
>         Point2D align = new Point2D.Double(dbMouse.getX(), dbMouse.getY());
>         EditWindow.gridAlign(align);
>         Point newPos = wnd.databaseToScreen(align);
>         try {
>             Robot r = new Robot();
>             Point offset = wnd.getLocationOnScreen();
>             r.mouseMove(offset.x+newPos.x, offset.y+newPos.y);
>             gridOffX = mouseX - newPos.x;
>             gridOffY = mouseY - newPos.y;
>         } catch(AWTException e) {}
>     }
> }
> -----------------------------------------------------
>
> and I declared field variables "int gridOffX=0, gridOffY=0;"
>
> and I added a call to "gridMouse(evt);" as the first line in the method
> "mouseDragged()"
>
>    -Steven Rubin
>
> --
> You received this message because you are subscribed to the Google Groups
> "Electric VLSI Editor" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<electricvlsi%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/electricvlsi?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Electric VLSI Editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/electricvlsi?hl=en.

Reply via email to