Setting the normal coordinates system in graphics (Simple Line) 
Author Message
 Setting the normal coordinates system in graphics (Simple Line)

Dear all..
  I have this query about the graphics. When trying to draw lines, it
is seen that the top left corner is set to (0,0) coordinates
defaultly. But, i want it to be at the middle of the frame or picture
box(whatever is being used.)-Something like a full coordinate system
to draw lines from negative points too.So, what i meant is , can we
have a method or any means by which the coordinate system can be set
by us  at our own wish..Please help me out.
   Thanks for any kind of replies.

Regards,
Pavs.



Sun, 28 Aug 2005 12:07:23 GMT  
 Setting the normal coordinates system in graphics (Simple Line)
Option Explicit

Private Sub Command1_Click()
    Command1.Top = 0
    Me.AutoRedraw = True
    Me.ScaleMode = vbPixels
    ' --- Set Coordinate system
    Me.ScaleTop = -Me.ScaleHeight / 2
    Me.ScaleLeft = -Me.ScaleWidth / 2
    ' --- Show X at 0, 0
    Me.CurrentY = 0
    Me.CurrentX = 0
    Me.Print "X"
    ' --- Show Pixel at 0, 0
    Me.PSet (0, 0), vbRed
    ' --- Show Lowest Pixel
    Me.PSet (0, Me.ScaleHeight / 2 - 1), vbGreen
End Sub



Quote:
>Dear all..
>  I have this query about the graphics. When trying to draw lines, it
>is seen that the top left corner is set to (0,0) coordinates
>defaultly. But, i want it to be at the middle of the frame or picture
>box(whatever is being used.)-Something like a full coordinate system
>to draw lines from negative points too.So, what i meant is , can we
>have a method or any means by which the coordinate system can be set
>by us  at our own wish..Please help me out.
>   Thanks for any kind of replies.

>Regards,
>Pavs.



Sun, 28 Aug 2005 16:35:53 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Graphic Coordinate system in VB4?

2. How to: simple graphics (lines) on transparent usercontrol

3. Getting system graphic display setting??

4. How do I coordinate the screen's coordinates with a form coordinate

5. .NET Graphics coordinates in a control

6. World coordinates in graphics

7. API graphic coordinates

8. coordinate system

9. API and Coordinate system

10. PaintPicture Coordinate Systems

11. Help with Screen/Client coordinate systems

12. Cartesian Coordinate system in VB

 

 
Powered by phpBB® Forum Software