Reverse 'pixelcoloring' and total amount of colors
William de Smet
williamdesmet at gmail.com
Mon Mar 5 13:50:47 CET 2018
Thanks for your reply!
Your app is the same as what I did before and that's quit easy to do.
For now I want to build instruction cards based upon a pixel drawing.
First you makel your drawing and then it gives you your instruction card.
The other way around.
My question is how to do that?
2018-03-05 13:40 GMT+01:00 Jose Enrique Montero via use-livecode <
use-livecode at lists.runrev.com>:
> I made a similar application, you can look,
> best regards
> 2018-03-05 3:55 GMT-04:00 William de Smet via use-livecode <
> use-livecode at lists.runrev.com>:
> > Hi there,
> > This is quite a challenge for me.
> > I an trying to build a template in which users (small children) can
> > 'pixeldraw' something and based on the drawing the instruction will be
> > made.
> > The instruction is needed for other children to make the pixel drawing.
> > The instruction is quite special.
> > The template is a square with 49 buttons (7x7) for the coloring and 49
> > fields for the instruction.
> > The coloring of the buttons is no problem. The 'reverse' coloring is the
> > problem.
> > I can get the amount of a colors in a row (5 x white and 2 x blue) but
> > do I determine on which place (in which buttons) these colors are.
> > The first row is: 3 white - 1 blue - 2 white - 1 blue
> > But how do I output it like: 3 - 1- 2 - 1 ? And each number needs to be
> > another field.
> > ---------------
> > on mouseup
> > if the backgroundcolor of btn "f1" is 255,255,255 then add "1" to field
> > "v1"
> > end mouseup
> > or
> > on mouseup
> > repeat with x=1 to 7
> > put "f"&x into tButton
> > if the backgroundcolor of btn tButton is 255,255,255
> > then
> > add "1" to field "v1"
> > else
> > add "1" to field "v2"
> > end if
> > end mousep
> > -------------------
> > What is the best way to do this?
> > Any pointers are welcome.
> > To easier understand what i am trying to do, see this image:
> > http://www.camelcaps.nl/pixelcoding/pixelcoding.jpg
> > greetings,
> > William
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the use-livecode