Update negative.bm

This commit is contained in:
visionmercer 2022-05-20 23:31:48 +02:00 committed by GitHub
commit 304aeadbc6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,25 +1,25 @@
Sub negative (__image As Long) Sub negative (image As Long)
Dim __dest As Long Dim olddest As Long
Dim __source As Long Dim oldsource As Long
Dim __y As Long Dim y As Long
Dim __x As Long Dim x As Long
Dim __orgc As _Unsigned Long Dim orgc As _Unsigned Long
Dim __r As Integer Dim r As Integer
Dim __g As Integer Dim g As Integer
Dim __b As Integer Dim b As Integer
__dest = _Dest olddest = _Dest
__source = _Source oldsource = _Source
_Dest __image _Dest image
_Source __image _Source image
For __y = 0 To _Height(__image) - 1 For y = 0 To _Height(image) - 1
For __x = 0 To _Width(__image) - 1 For x = 0 To _Width(image) - 1
__orgc = Point(__x, __y) orgc = Point(x, y)
__r = 255 - _Red(__orgc) r = 255 - _Red(orgc)
__g = 255 - _Green(__orgc) g = 255 - _Green(orgc)
__b = 255 - _Blue(__orgc) b = 255 - _Blue(orgc)
PSet (__x, __y), _RGB32(__r, __g, __b) PSet (x, y), _RGB32(r, g, b)
Next Next
Next Next
_Dest __dest _Dest olddest
_Source __source _Source oldsource
End Sub End Sub