tags:

views:

30

answers:

2

Hi, I am starting to work with images in WPF and I am using the next pice of code ...

                                    <LineSegment Point="100,-100"/>



                                </PathFigure>
                            </PathGeometry>
                        </GeometryDrawing.Geometry>
                    </GeometryDrawing>
                </DrawingImage.Drawing>
            </DrawingImage>
        </Image.Source>
    </Image>

How ever it seems like the x,y coordinate system is backwards i mean, I learn in math that in the coordinate plane starts at zero at the bottom and goes up higher on the y axis but in WPF it is the reverse. Zero is at the top of the screen and goes up and you go down the y axis

I read about this in a book and in internet but i do not seem to find the logic of this ... any comments why the WPF use this logic?

Thanks !!!!

+1  A: 

As far as I know, it's been convention since the early days of graphical computing to measure coordinates from the top-left. Sure, in maths we generally have the origin in the bottom-left, but then it is from the top-left we read (at least in English and other Western languages).

Noldorin
mmm Ok so is just a convention, ok .. but ? what are the insigths of that? why messure that way instead of the old math way?, is there somethins wrong with the old convention?Thanks !!
carlos
Conventions are arbitrary... Also, books have been written with the text starting in the top-left for millenia, long before there was any mathematical convention. Why not follow that instead? Arguably screen grahpics is more closely related to reading than maths.
Noldorin
Why use the old math way? What technical advantages does it offer you?
Jonathan Allen
A: 

Take a look at this book

Go to the 36th page using control panel of scribd. There is explanation of 2d coordinate system.

Eugene Cheverda