[Solved] Writepixels argb() method not working
Monkey Forums/Monkey Beginners/[Solved] Writepixels argb() method not working
| ||
I could not get it working to draw certain colors to a image. I found a argb function on the blitz site and converted it to monkey. But it only shows a black screen. I modified a working example from this forum that worked but it did not show how to draw using set colors. I hope someone can show me a working argb method that I can use to draw pixels to an image. I wish to create images from data statements(arrays) and also using a couple of rgb colors and transparent pixels to. |
| ||
Your alpha is zero, so the image is transparent. You might want to change the argb function so that the default alpha is 255. |
| ||
I changed it and it is still not working. When I set the int value in the pixel array to a other value nothing is drawn either, I hae no idea what is going on, My laptop is doing a virus scan and is very slow atm. It takes a couple of minutes to load a page :) |
| ||
I found the error The or needed to be the | character. |
| ||
Heh, I never spotted that! I usually use hex for colours myself (e.g. red = $FFFF0000), or it would probably have stood out more. |
| ||
Can you just assign hex into integer variables and then write pixels with that? |
| ||
I was not on my laptop, but on my ipad so I could not check. I was watching Manchester United on the tv. I checked now and see that you can assign hex values to variables(integers) using int = $hexvalue The assignement of colors is : $alpha(00-FF)red(00-FF),green(00-FF),blue(00-FF) |