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. resize rectangle [modified]

resize rectangle [modified]

Scheduled Pinned Locked Moved C#
questioncsharpwinformsgraphics
4 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.
  • T Offline
    T Offline
    Try
    wrote on last edited by
    #1

    I am using VC# GDI+ When i click on the form, a rectangle with Tracker (with resize and rotate options) is added. I can resize rectangle by dragging the corners of the rectangle (tracker). I can rotate it too. When the rectangle does not have any rotation, if i drag the topleft corner, the logic is moving Rectangle's X and Y position and modifying the width and height, then it works fine. But the question is that after i have rotated the rectangle (ex:30 degrees), the TopLeft corner dragging will take something wrong with the Top/Left moving and width/Height modifying logic. How can I correctly resize the element which has been rotated? or how can I correctly calculate the Top/Left displacement through the TopLeft corner dragging? Thank you in advance.

    modified on Thursday, January 31, 2008 8:16:40 AM

    A 1 Reply Last reply
    0
    • T Try

      I am using VC# GDI+ When i click on the form, a rectangle with Tracker (with resize and rotate options) is added. I can resize rectangle by dragging the corners of the rectangle (tracker). I can rotate it too. When the rectangle does not have any rotation, if i drag the topleft corner, the logic is moving Rectangle's X and Y position and modifying the width and height, then it works fine. But the question is that after i have rotated the rectangle (ex:30 degrees), the TopLeft corner dragging will take something wrong with the Top/Left moving and width/Height modifying logic. How can I correctly resize the element which has been rotated? or how can I correctly calculate the Top/Left displacement through the TopLeft corner dragging? Thank you in advance.

      modified on Thursday, January 31, 2008 8:16:40 AM

      A Offline
      A Offline
      Anthony Mushrow
      wrote on last edited by
      #2

      Try wrote:

      I am using VC++ GDI+

      Thats your problem right there, this is the c# board. :doh: And how can we advise you on what your doing wrong, if you don't post a snippet of the 'logic' you are using.

      My current favourite word is: Nipple!

      -SK Genius

      T 1 Reply Last reply
      0
      • A Anthony Mushrow

        Try wrote:

        I am using VC++ GDI+

        Thats your problem right there, this is the c# board. :doh: And how can we advise you on what your doing wrong, if you don't post a snippet of the 'logic' you are using.

        My current favourite word is: Nipple!

        -SK Genius

        T Offline
        T Offline
        Try
        wrote on last edited by
        #3

        Oh! I am sorry. I am actually using VC#. I have edited the post.. Confusion...

        J 1 Reply Last reply
        0
        • T Try

          Oh! I am sorry. I am actually using VC#. I have edited the post.. Confusion...

          J Offline
          J Offline
          Justin Perez
          wrote on last edited by
          #4

          Try wrote:

          Oh! I am sorry. I am actually using VC#. I have edited the post.. Confusion...

          You still forgot to post your code. Without that, how can we see what you are doing wrong, or make different suggestions, etc etc. You know? :)

          I'm going to become rich when I create a device that allows me to punch people in the face over the internet. "If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer

          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