- Home
·
- Graphics
·
- Merges an area with a new color. Good for translucent menus.
Merges an area with a new color. Good for translucent menus.
Merges an area with a new color. Good for translucent menus.
Rate Merges an area with a new color. Good for translucent menus.
(1(1 Vote))
Dim LONG1 As Long
Dim LONG2 As Long
Dim R1 As Long
Dim G1 As Long
Dim B1 As Long
Dim R2 As Long
Dim G2 As Long
Dim B2 As Long
Dim r As Long
Dim G As Long
Dim B As Long
LONG1 = frm.Point(pointX, pointY)
LONG2 = translucentColor
B1 = LONG1 \ 65536
G1 = (LONG1 - B1 * 65536) \ 256
R1 = LONG1 - B1 * 65536 - G1 * 256
B2 = LONG2 \ 65536
G2 = (LONG2 - B2 * 65536) \ 256
R2 = LONG2 - B2 * 65536 - G2 * 256
r = (R1 + R2) / 2
G = (G1 + G2) / 2
B = (B1 + B2) / 2
frm.PSet (pointX, pointY), RGB(r, G, B)
End Sub
Sub drawTranslucent(frm As Form, x1 As Integer, y1 As Integer, x2 As Integer, y2 As Integer, translucentColor As Long)
Dim x As Integer
Dim i As Integer
For x = x1 To x2
For i = y1 To y2
drawTranslucentPx frm, x, i, translucentColor
Next
Next
End Sub
Merges an area with a new color. Good for translucent menus. Comments
No comments yet — be the first to post one!
Post a Comment