Possibile riempire oggetto

Salve a tutti,
vorrei creare un'app di abbinamento colori dei vestiti; quindi è possibile scegliere un colore da una palette e riempire l'oggetto?
Saluti
Nicola


1 Like

How you might do this will depend on your image assets.

As you show them in your images above, you could use a canvas (and use @Juan_Antonio 's floodfill extension)

Alternatively, if your line drawing images are transparent png files, you could place a button inside an arrangement, set the image to the button, set the colour to the arrangement.

@TIMAI2 stavo provando AIA di @Juan_Antonio; ma mi restituisce un errore :thinking:

1 Like

Works OK for me...(Android 12)

  1. Check your file paths
  2. make sure you are working with a file in a writeable location (copy a file from assets to ASD)
  3. May be better to try an image with a white background, instead of transparent
  4. Reload the canvasbackground after you have changed a colour.

You may get some help from my Paint app.

It has everything you might need.

  1. Choose a colour from the pallete. It will then be set as the background colour of an arrangement, to show which colour is currently selected.

  2. A fill option to change the background colour of the canvas.

  3. An ImagePicker option to set an image above the background color. Use a transparent image for what you want. I haven't sorted out the canvas size issues though. It works properly for a square image.

AIA : Paint.aia (263.1 KB)

@TIMAI2 ho copiato le 3 immagini in ASD e poi ho provveduto a creare il file APK; ma l'app non si avvia :thinking: