Results 1 to 2 of 2

Thread: System.Drawing Drawing points to single percision. is it possible?

  1. #1

    Thread Starter
    Frenzied Member bmahler's Avatar
    Join Date
    Oct 2005
    Location
    Somewhere just west of the Atlantic
    Posts
    1,568

    System.Drawing Drawing points to single percision. is it possible?

    Ok, here is my issue. I have a custom control that I wrote for a game that works like a radar. For the most part it works perfectly, except I have one issue. Positions in the game are stored as singles and it seems like, even though a pass a single into my X and Y coordinates when drawing my points on the map, it seems to round them to the nearest whole number, causing thins to move in sort of step like pattern. Is there any way to draw a point using single precision or am I bound to only whole numbers?
    Boooya
    • Visual Studio 2008 Professional
    • Don't forget to use [CODE]your code here[/CODE] when posting code
    • Don't forget to rate helpful posts!
    • If you're question was answered please mark your thread [Resolved]


    Code Contributions:
    PHP
    PHP Image Gallery v1.0PHP Image Gallery v2.0
    VB 2005
    Find Computers on a networkSimple License EncryptionSQL Server Database Access dllUse Reflection to Return Crystal ReportDocumentSilently Print PDFGeneric Xml Serailizer


    Useful Links: (more to come)
    MSDN (The first and foremost)MSDN Design Guidelines API Reference • Inno Setup CompilerInno Setup PreprocessorISTool - Fairly easy to use GUI for creating inno setup projects • Connection StringsNAnt -Automated BuildsCruise Control .NET - Frontend for automated builds

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: System.Drawing Drawing points to single percision. is it possible?

    Drawing a point would involve drawing a single pixel. The smallest amount that you can move that is one pixel. You can't move the drawing by part of a pixel so floating-point numbers aren't relevant. If you're talking about some unit of measure other than pixels then you need to state that.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width