Forums

OverviewV-Play 1 SupportDrawing with Mouse/Finger › Reply To: Drawing with Mouse/Finger

OverviewV-Play 1 SupportDrawing with Mouse/Finger › Reply To: Drawing with Mouse/Finger
#6285

Christian
V-Play Team

Hi JJ,

great that you like it so far, and welcome to the V-Play community. :)

For your example, I can see 2 ways to do this:

1.) Use the LineItem component and add to the points array when the mouse position changes by a given delta (to avoid performance getting too bad due to loads of points added).

2.) Add a new SingleSpriteFromFile object when the mouse position changed by a given delta. The image you are using should have the color of the line you prefer and probably it’s best to make it a circle with smooth edges. This has the advantage that it is more performant, because only a single draw call is needed for all “points” along the line. However, this solution is also a bit more complex and for a proof of concept I would go for the above approach first.

Cheers, Chris

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support