January 19, 2021, 05:54:39 AM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Forum
Help
Search
Gallery
Login
Register
SyntaxBomb - Indie Coders
»
Languages & Coding
»
Blitz Code Archives
»
Graphics
»
[bb] Transparent Background by pexe [ 1+ years ago ]
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: [bb] Transparent Background by pexe [ 1+ years ago ] (Read 636 times)
BlitzBot
Jr. Member
Posts: 1
[bb] Transparent Background by pexe [ 1+ years ago ]
«
on:
June 29, 2017, 12:28:38 AM »
Title :
Transparent Background
Author :
pexe
Posted :
1+ years ago
Description :
It's a little slow.. But makes a nice effect.. recommended for your game GUI..
Transparent its not the correct way to call this.. because it works like a sieve.. just writing pixels each 4..
Code :
Code: BlitzBasic
Function
TransparentBackground
(
Start_x%,Start_y%,Width%,Height%,Color_R% =
255
,Color_G% =
255
,Color_B% =
255
)
End_y = Start_y%+Height%
End_x = Start_x%+Width%
WP_Color =
(
Color_B%
Or
(
Color_G%
Shl
8
)
Or
(
Color_R%
Shl
16
)
Or
(
$ff000000
)
)
LockBuffer
For
y = Start_y%
To
End_y-
1
a =
Abs
(
a-
1
)
For
x = Start_x%+
(
a*
2
)
To
End_x-
1
Step
4
WritePixelFast
x,y,WP_Color
Next
Next
UnlockBuffer
End Function
Comments :
none...
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
SyntaxBomb - Indie Coders
»
Languages & Coding
»
Blitz Code Archives
»
Graphics
»
[bb] Transparent Background by pexe [ 1+ years ago ]
SimplePortal 2.3.6 © 2008-2014, SimplePortal