epreston / PSTreeGraph

A tree graph view control for iPad applications. This is a port of the sample code from Max OS X to iOS (iPad).
http://epreston.github.io/PSTreeGraph/
259 stars 50 forks source link

Drawing a PSTreeGrap bottom-up #21

Open mahmuzicamel opened 11 years ago

mahmuzicamel commented 11 years ago

Hi, I really love your PSTreeGraph! Thank you for your time spent on this, I think. I just want to know if it is possible to place a root on the bottom of the screen and draw a tree bottom-up? Thank you

epreston commented 11 years ago

Your welcome (on behalf of myself other contributors too). The best way to thank everyone is to make your improvements available for peer review and inclusion by doing a pull request. :-)

Anythings possible, it already supports a few options for orientation. You will find that the rendering code and flags are fairly self contained. Check the behaviour of the rendering and orientation flags introduced in the last couple of pushes.

epreston commented 11 years ago

Specifically, check out the "PSTreeGraphOrientationStyleVerticalFlipped" value of the "PSTreeGraphOrientationStyle" enumeration. If it's implemented, you can "git blame" to see if it was me or Chad.

typedef enum PSTreeGraphOrientationStyle : NSUInteger {
    PSTreeGraphOrientationStyleHorizontal = 0,
    PSTreeGraphOrientationStyleVertical = 1,
    PSTreeGraphOrientationStyleHorizontalFlipped = 2,
    PSTreeGraphOrientationStyleVerticalFlipped = 3,
} PSTreeGraphOrientationStyle;