How to do signature and save it

Who to do signature and save it

i have this code in the Paint event but no works like signature

For Each p As Point In mTouches
g.LineColor = Color.Blue
g.FillColor = Color.Blue
g.FillOval(p.X, p.Y, 10,10 )
Next

You should ask in the Spanish channel too, in your (supposed) native language. Not sure if everybody is understanding the question.

https://forum.xojo.com/conversations/espanol

ok
thanks

[quote=460368:@Alexis Colon Lugo]Who to do signature and save it

i have this code in the Paint event but no works like signature

For Each p As Point In mTouches
g.LineColor = Color.Blue
g.FillColor = Color.Blue
g.FillOval(p.X, p.Y, 10,10 )
Next[/quote]
Right. You need to also draw to a picture so you can save it afterwards.

What I am looking for is to collect client signatures in canvas using an iPAD application and save the signature in my database

this code works but i have to move the finger slow to draw corrects
in paint Events

For Each p As Point In mTouches
g.LineColor = Color.Blue
g.FillColor = Color.Blue
g.DrawLine( p.X-2, p.Y,p.X, p.Y)
Next

Hello
If what I am trying to do can be achieved using xojo or not.

It is my first project using iOS and I would not like to waste my time.

Definitely possible. Save the points in the pointer drag event then display in the paint event. If the iOSCanvas isn’t working for you try the SwipeView in iOSKit which has a similar interface but more events. I made something similar for a simple drawing app.

Don’t draw dots or dashes
Draw lines between one point and the next.

remember that a signature will need several start and end points … as if the pen goes down, moves, then comes up.
I do not know what mTouches is: if it is a dictionary or collection, you may need to change it to an array, so that you can be certain of the order of the points.

So, assuming it is an array

g.LineColor = Color.Blue g.FillColor = Color.Blue dim p as point dim p2 as point For x as integer = 1 to mTouches.ubound p = mTouches(x-1) p2 = mTouches(x) g.DrawLine( p.X, p.y.Y,p2.X, p2.Y) Next
That will get you one line.
But you will need several arrays to do a signature.

Or just one that includes pen states along with x,y (pen down, pen move, pen up).

ok
i going to try

thanks

Hi Jason King

where i can get the SwipeView and how i add to my project

thanks

[quote=460704:@Alexis Colon Lugo]Hi Jason King

where i can get the SwipeView and how i add to my project

thanks[/quote]

Alexis go here iOSKit

Can any one give me a direction where to go or start with iOSkit i am lost.

Search the forum and there is a lot on it. But basically open the project, copy the modules folder into your project and then you have everything ready to go. There are examples included for a lot of things (but definitely not everything). I recommend you build the project and test it out.

ok
thanks

For Each p As Point In mTouches
g.FillColor = Color.Blue
g.FillOval(p.X, p.Y, 5, 5)
Next

what is mTouches equivalent in SwipeView1

I need to finish as soon as possible, i am willing to pay someone to help me or make the client signature for $50.00.

thanks

[quote=461424:@Alexis Colon Lugo]For Each p As Point In mTouches
g.FillColor = Color.Blue
g.FillOval(p.X, p.Y, 5, 5)
Next

what is mTouches equivalent in SwipeView1[/quote]
Use the LayerTouch event. Type of 0 is began. 1 is moved. 2 is ended I believe. It will give you an array of values which are the points where the touches are

I can’t get it to works.

If any example ?