Post by dw817 on Apr 17, 2009 20:45:04 GMT -5
Tom:
* Please add simple blitter functions to either B4GL or as an added DLL new or added to existing 2D library.
Includes:
get(h,v,x,y,a$)
Where pixels are read from h,v size of x,y and stored into string a$
(strings can be really large right ?)
and then:
put(h,v,a$,zorder)
Where the image is stuffed right back in at zorder position.
if zorder is difficult albeit impossible, then change to Mode.
=0 overwrite, =1 insert, =2 invert, =3 mask remove
tinting recorded images would also be nice.
where puttint(h,v,1,1,1,a$) is normal
and puttint(h,v,1,.5,1,a$) takes out half of green.
puttint(h,v,-1,-1,-1) would invert the colors completely.
Doing this, coders could save off entire images as single strings to a file CR delimited (possible req. 7-bit),
and that's GOTTA be useful to others.
update Apr 18 2009
Tom, I am trying out your 2d DLL and there are some problems.
1. You cannot use normal sprites or map tiles with them. Doing so, all your pixel work is cleared, even if you aren't plotting on top of it with the sprites or tilework.
2. Pen thickness does not affect single dot plots.
3. * You are forced to use swapbuffers() with this DLL.
I prefer to use drawtext() to show updated plots, however, it doesn't work. Additionally swapbuffers() never starts entirely ON or OFF the visible/hidden page in a new RUN, it is in the last state, so you never know what state it is in by running your app. Prefer swapbuffers() to be initially 0 (zero), just not unknown.
4. Running this program multiple times gives you different results where the X & Y end depending on what state the screen refresh is in. Run it, pause 1-2 seconds and run it again.
Running the same code should give you the same results always, but it doesn't. This is a problem.
As an additional suggest, would like to see pointr, pointg, pointb() return colors of a point via: pointr(x,y), or just point(x,y) for a 32-bit number color.
This is all I can offer.
* Please add simple blitter functions to either B4GL or as an added DLL new or added to existing 2D library.
Includes:
get(h,v,x,y,a$)
Where pixels are read from h,v size of x,y and stored into string a$
(strings can be really large right ?)
and then:
put(h,v,a$,zorder)
Where the image is stuffed right back in at zorder position.
if zorder is difficult albeit impossible, then change to Mode.
=0 overwrite, =1 insert, =2 invert, =3 mask remove
tinting recorded images would also be nice.
where puttint(h,v,1,1,1,a$) is normal
and puttint(h,v,1,.5,1,a$) takes out half of green.
puttint(h,v,-1,-1,-1) would invert the colors completely.
Doing this, coders could save off entire images as single strings to a file CR delimited (possible req. 7-bit),
and that's GOTTA be useful to others.
update Apr 18 2009
Tom, I am trying out your 2d DLL and there are some problems.
1. You cannot use normal sprites or map tiles with them. Doing so, all your pixel work is cleared, even if you aren't plotting on top of it with the sprites or tilework.
2. Pen thickness does not affect single dot plots.
3. * You are forced to use swapbuffers() with this DLL.
I prefer to use drawtext() to show updated plots, however, it doesn't work. Additionally swapbuffers() never starts entirely ON or OFF the visible/hidden page in a new RUN, it is in the last state, so you never know what state it is in by running your app. Prefer swapbuffers() to be initially 0 (zero), just not unknown.
4. Running this program multiple times gives you different results where the X & Y end depending on what state the screen refresh is in. Run it, pause 1-2 seconds and run it again.
mode2d(1024,739)
dim x,y
for y=0 to 738 step 2
for x=0 to 1023 step 2
plot(x,y)
next
next
Running the same code should give you the same results always, but it doesn't. This is a problem.
As an additional suggest, would like to see pointr, pointg, pointb() return colors of a point via: pointr(x,y), or just point(x,y) for a 32-bit number color.
This is all I can offer.