Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. GDI+ missing functionality in PocketPC

GDI+ missing functionality in PocketPC

Scheduled Pinned Locked Moved C#
graphicswinformshelpquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Gizz
    wrote on last edited by
    #1

    Sorry if this is a common problem that people already know the answer to, but... I've written a cool app for use in aircraft navigation, and it draws a compass rose by drawing to a graphics path and then using a matrix to rotate it. Except this functionality is missing in the PocketPC GDI+ library. Apart from the obvious (write my own anti-aliased rotation code) is there anything I can do to get this to work on a PocketPC? TIA. for (int i = 0; i < 360; i+=10) { GraphicsPath gpRose = new GraphicsPath(); gpRose.AddLine(centre.X, centre.Y - radius - 3, centre.X, centre.Y - radius - 13); if (i%30 == 0) { gpRose.AddString(i.ToString("000"), new FontFamily("Arial"), (int)FontStyle.Regular, 10, new PointF(centre.X - hdgWidth/2, centre.Y - radius - 25), null); } Matrix roseMatrix = new Matrix(); roseMatrix.RotateAt((float)(i-iActualHeading), new PointF(centre.X, centre.Y)); gpRose.Transform(roseMatrix); e.Graphics.DrawPath(p, gpRose); }

    H 1 Reply Last reply
    0
    • G Gizz

      Sorry if this is a common problem that people already know the answer to, but... I've written a cool app for use in aircraft navigation, and it draws a compass rose by drawing to a graphics path and then using a matrix to rotate it. Except this functionality is missing in the PocketPC GDI+ library. Apart from the obvious (write my own anti-aliased rotation code) is there anything I can do to get this to work on a PocketPC? TIA. for (int i = 0; i < 360; i+=10) { GraphicsPath gpRose = new GraphicsPath(); gpRose.AddLine(centre.X, centre.Y - radius - 3, centre.X, centre.Y - radius - 13); if (i%30 == 0) { gpRose.AddString(i.ToString("000"), new FontFamily("Arial"), (int)FontStyle.Regular, 10, new PointF(centre.X - hdgWidth/2, centre.Y - radius - 25), null); } Matrix roseMatrix = new Matrix(); roseMatrix.RotateAt((float)(i-iActualHeading), new PointF(centre.X, centre.Y)); gpRose.Transform(roseMatrix); e.Graphics.DrawPath(p, gpRose); }

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      While the GraphicsPath and Matrix classes aren't supported in the Compact Framework, the Graphics class is. It won't be easy since you'll have to do a lot of calculates instead of harnessing the power of the Matrix (and I thought the "Matrix" was a bad thing! :)), but you could perform all the drawing using the methods of the Graphics class.

      -----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----

      L 1 Reply Last reply
      0
      • H Heath Stewart

        While the GraphicsPath and Matrix classes aren't supported in the Compact Framework, the Graphics class is. It won't be easy since you'll have to do a lot of calculates instead of harnessing the power of the Matrix (and I thought the "Matrix" was a bad thing! :)), but you could perform all the drawing using the methods of the Graphics class.

        -----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----

        L Offline
        L Offline
        leppie
        wrote on last edited by
        #3

        I tried to port a custom control earlier today, and althought the Graphics class is availble, its severly limited. I did notice a GAPI .NET wrapper on pocketpcdn.com[^] leppie::AllocCPArticle("Zee blog");
        Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups