flip coordinates when drawing to control

前端 未结 5 487
深忆病人
深忆病人 2020-12-06 06:05

I am drawing a graph on a control, but 0,0 is at the top-left hand corner of the control. Is there a way to flip the coordinates so that 0,0 is at the lower left corner of t

5条回答
  •  太阳男子
    2020-12-06 06:40

    in short no, however if i am drawing on controls a lot i have a few functions that help me:

    Point GraphFromRaster(Point point)  {...}
    Point RasterFromGraph(Point point)  {...}
    

    this way i keep all the conversion in one place, no worrying about things like y - this.Height scattered about the code.

提交回复
热议问题