line_left/line_up/line_down/line_right?

14 views
Skip to first unread message

RB Whitaker

unread,
Nov 25, 2018, 2:45:29 AM11/25/18
to Prawn
In Prawn, I have the ability to do move_up/move_down/move_left/move_right. I'm just wondering if there's a way to basically do the same thing, but plot a line to that point as you go. Like line_to, just with only needing to specify a relative amount to go.

Now that I'm thinking about it, I could probably make something easily enough on my own. I'm new to Prawn and Ruby, but I think I know enough to be able to build that. Of course, it would be silly to build my own if one exists already...

RB Whitaker

unread,
Nov 25, 2018, 1:21:28 PM11/25/18
to Prawn
I think I can see now that there is no move_left/move_right. Just up and down. Looks like the cursor is basically just a y component.

Edward Ellis

unread,
Nov 25, 2018, 11:38:52 PM11/25/18
to Prawn
Have you read the manual "Prawn by example"?  The graphics section addresses these questions.  For example it identifies the move_to x, y and line_to x, y methods.

RB Whitaker

unread,
Nov 26, 2018, 10:02:38 PM11/26/18
to Prawn
Well I wouldn't claim to have read the whole thing, but I have read enough to have read about move_to and line_to. It's just that there's a move_up and a move_down. I'm just wishing (hoping?) that there were a move_left x, where you can specify a relative amount to move in a specific direction (left). Guess that doesn't exist though?
Reply all
Reply to author
Forward
0 new messages