|
Post by Rod on Feb 24, 2019 11:10:51 GMT -5
The "size" graphics command has no effect when using "set" though I have seen it change line size in the drawX code. Also there is a big difference in drawing. Using "set" the update is visible and continuous. Using box the update is delayed till the entire drawing is done. "box" seems to apply "boxfilled" drawing. Early days but fun and exciting.
WindowWidth = DisplayWidth WindowHeight = DisplayHeight
PI = 3.141593
dim r(WindowWidth) dim g(WindowWidth) dim b(WindowWidth) dim color(2, 255)
graphicbox #1.gb, 0, 0, DisplayWidth, DisplayHeight open "Plasma" for graphics as #1 print #1, "trapclose [quit]"
print #1.gb, "down ;fill black ; size 5"
for x = 1 to WindowWidth r(x) = sin(x / (128))* 256 g(x) = sin(x / (64)) * 128 b(x) = sin(x / (32)) * 64 next x
for i = 0 to 255 color(0,i)= abs(int(128 - 127 * sin(i * PI / 32))) color(1,i)= abs(int(128 - 127 * sin(i * PI / 64))) color(2,i)= abs(int(128 - 127 * sin(i * PI / 128))) next i
for y = 0 to WindowHeight step 5 scan for x = 0 to WindowWidth step 5 col = abs((r(x) + g(x) + b(y)) mod 255) print #1.gb, "color ";color(0,col);" ";color(1,col);" ";color(2,col) print #1.gb, "size 5 ; set ";x;" ";y 'print #1.gb, "place ";x;" ";y;" ; box ";x+5;" ";y+5; next x next y
wait [quit] close #1 end
|
|
BeeTrap
New Member
Posts: 45
Member is Online
|
Post by BeeTrap on Feb 27, 2019 1:22:54 GMT -5
I just now ran this code and get something strange. I am using a dual monitor setup, different size, different resolutions and different DPI scaling on the monitors. When I run this code, as is, the graphicbox is on the second monitor. Played with "WindowWidth = DisplayWidth - 800 : WindowHeight = DisplayHeight - 400" and doing same subtraction, one modification at a time, on the graphicbox's last 2 parameters. I tried decreasing the values just to see how big the box actually was. Am I not seeing something or is this supposed to appear on my second monitor? This may help me to reinvent my "Screen Blanker - Sorta" code that I had posted on ConForums. I apologize to anyone that copied that code, it was rough and required beating with a hammer ever time I changed any of my monitor settings.
|
|