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 / C++ / MFC
  4. line thinkness

line thinkness

Scheduled Pinned Locked Moved C / C++ / MFC
data-structuresjsonhelp
25 Posts 6 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.
  • E Eugen Podsypalnikov

    Probably a special DC Mapping Mode[^] was set in the calling context... :) (For example: Carlo Pallini has given his calling context - there are no modifications of the DC Mapping Mode there, so it is possible to "feel" the arguments by 2 or 5 too :) )

    virtual void BeHappy() = 0;

    A Offline
    A Offline
    arun_pk
    wrote on last edited by
    #21

    Eugon I think i need to learn About setting Modes its my pleasure to talk with you thanks a lot it really helped me arun

    E 1 Reply Last reply
    0
    • C Code o mat

      No probs, here[^] you can find info about the mapping modes as mentioned by someone, try setting the MM_TEXT mapping mode before drawing your line and see what results that produces.

      > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Sometimes you just have to hate coding to do it well. <

      A Offline
      A Offline
      arun_pk
      wrote on last edited by
      #22

      i m goign through the article thanks a lot

      1 Reply Last reply
      0
      • A arun_pk

        Eugon I think i need to learn About setting Modes its my pleasure to talk with you thanks a lot it really helped me arun

        E Offline
        E Offline
        Eugen Podsypalnikov
        wrote on last edited by
        #23

        You are welcome, Arun ! :) (please observe the function that does call paint_line(..) - maybe, there is some variable like float fZoomingFactor there, so you could call the function like paint_line(.., thickness * fZoomingFactor, ..) :) )

        virtual void BeHappy() = 0;

        A 1 Reply Last reply
        0
        • E Eugen Podsypalnikov

          You are welcome, Arun ! :) (please observe the function that does call paint_line(..) - maybe, there is some variable like float fZoomingFactor there, so you could call the function like paint_line(.., thickness * fZoomingFactor, ..) :) )

          virtual void BeHappy() = 0;

          A Offline
          A Offline
          arun_pk
          wrote on last edited by
          #24

          yup Eugen Zooming factor is existing i am adjusting my code according to that ...

          1 Reply Last reply
          0
          • A arun_pk

            I am using pen to plot lines in graph hpen = CreatePen(PS_SOLID, thickness, rgb); even after giving the thinkness parameter as 5 . thickness of the line still remain same as if we put zero... is there any thing i m missing to add or any code or api to increase thickness of the line pls help me to come out of this mess thanks in advance............

            R Offline
            R Offline
            Raj Jaiswal
            wrote on last edited by
            #25

            //Create pen based on your requirement. HPEN hPen= CreatePen(PS_SOLID, thickness, RGB(0,0,0)); //Select the created pen in Device context. If you want to capture capture the old pen. Once you are //done with the drawing select the old pen back and destroy the pen you have created. HPEN hOldPen = (HPEN) SelectObject(hdc, hPen); //Do your drawing here. ... ... ... //Select the old pen back so that the newly created pen will get deselected. SelectObject(hdc, hOldPen ); //Delete the pen. DeleteObject(hpen); Use above mentioned code to draw your line with thickness.

            Raj Jaiswal

            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