Share My Creation Easy dimensions

https://play.google.com/store/apps/details?id=com.cote.montaj

How many times did you heard the expresion: ...ok I will send you a picture instead !
talking to phone sometimes it is not enough to transmit your details .

Check out following posts for more intresting stuff over b4a coding.


Thank you and long live b4a.

snapshot.png
 
Last edited:

sorex

Expert
Licensed User
Longtime User
please replace the image with a non WEBP version. FireFox and probably some others don't support that.
 

hookshy

Well-Known Member
Licensed User
Longtime User
New version is released with more intresting stuff , try it !

From one of basic stuff of Erels tutorial ...moving single panel I got to move the canvas panell and the object that is going to be drawn into it .


B4X:
'coding is wonderfull ..simple stuff can bring 5 star features NO LIBS INVOLVED for these features
'thank you b4a

' img the parent canvas , preview the objects panel

'action , the basics
  img.Left=X-x0
    img.Top=Y-y0

'reference , first point reference
    x0=X-img.left
    y0=Y-img.Top

'the drawing targets of the drawn object
Dim nx,ny As Int

If img.Left>0 Then

nx=-Abs(img.Left)
If preview.Left>0 Then
nx=nx+Abs(preview.Left)
Else
nx=nx-Abs(preview.Left)
End If


Else
nx=Abs(img.Left)

If preview.Left>0 Then
nx=nx+Abs(preview.Left)
Else
nx=nx-Abs(preview.Left)

End If


End If

If img.Top>0 Then
ny=-Abs(img.Top)

If preview.Top>0 Then
ny=ny+Abs(preview.Top)
Else
ny=ny-Abs(preview.Top)
End If


Else
ny=Abs(img.Top)

If preview.Top>0 Then
ny=ny+Abs(preview.Top)
Else
ny=ny-Abs(preview.Top)
End If


End If
 
Top