AVAX-software.com Forums: Get Extents of Drawing - AVAX-software.com Forums

Jump to content

Page 1 of 1

Get Extents of Drawing

#1 User is offline   compassauto Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 22-December 11

Posted 23 December 2011 - 03:29 PM

I am trying to get the total extents of the current drawing and show it in a label.

As shapes are added (arcs, lines, circles) I need to show the Height / Width (X,Y) of all of the current drawn shapes.

I tried:

GetBoundsAvax - but this only returns the drawing area (on the form)
GetBoundsDrawing - same as above

It seems the only way is GetBoundsSelectedItems - but then I need to select all items?

I'm trying to use this function on a timer event so it is updated constantly - Is there another function?

Also - is there a way to show mouse cursor X Y position when it is over the Drawing Window (cAvax1)

I tried mouse.x , mouse.y - but that returns the location on thr form - not the X Y location of Avax.

Thanks for any help or suggestions

#2 User is offline   compassauto Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 22-December 11

Posted 23 December 2011 - 03:42 PM

I found the function for Mouse Position - CurrentXY

Thanks

#3 User is offline   Gemalde Icon

  • Administrator
  • Icon
  • Group: Admin
  • Posts: 8
  • Joined: 10-June 05
  • Location:Athens - Greece

Posted 29 December 2011 - 08:53 PM

Regarding you first question, you have to use "CalcBoundsDrawing" function before "GetBoundsDrawing". You can call function "CalcBoundsDrawing" inside event "Change". By this way you can calculate the borders of the drawing when the end-user makes a change on it.

Page 1 of 1


Fast Reply

  

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users