Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Draw on Background like a Canvas

A topic by pauladam94 created 14 days ago Views: 67 Replies: 2
Viewing posts 1 to 3

Is is possible to draw on the Background of a Deck like in a canvas ? Drawing line and stuff like that ?

REASON :
I was trying to use the fact that widget can be made draggable to use them as point in a graph. Then I would like to draw between them lines and arrow that canbe scripted and change when we drag on node around.

Developer

The background image of a card is "card.image", an Image Interface. You can do some kinds of drawing and compositing directly with an Image, but it is less general than a Canvas Interface. Images are simple values which can be created on the fly, while Canvases are widgets that are attached to a deck and have awareness of e.g. the deck's palette, brushes, and fonts.

You could make a canvas the size of an entire card, if you like, and/or draw to a canvas elsewhere and use .copy[] and .paste[] to transfer image data to the card background.

(+1)

Ok thanks, I will try doing something like !