The api's are in place, it's just that the bitmap confused me for some time. I managed to create a cross using a 16 byte array, or to which i changed later, integer array with 8 elements (bBytes(0 To 7) As Integer)
Here's a pattern editor i made at the same time, otherways i would never have understood how the bits were placed.Code:For n = 0 To 7 bBytes(n) = 127 Next n bBytes(0) = 0
Code:Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) On Error Resume Next If Button = 1 Then bBytes(Int(Y / Picture1.ScaleHeight * 8)) = bBytes(Int(Y / Picture1.ScaleHeight * 8)) Or 2 ^ (Int(X / Picture1.ScaleWidth * 8)) ElseIf Button = 2 Then bBytes(Int(Y / Picture1.ScaleHeight * 8)) = bBytes(Int(Y / Picture1.ScaleHeight * 8)) And Not 2 ^ ((Int(X / Picture1.ScaleWidth * 8))) End If Form_Paint For X = 0 To 7: For Y = 0 To 7 Picture1.Line (Y * Picture1.ScaleWidth \ 8, X * Picture1.ScaleHeight \ 8)-Step(Picture1.ScaleWidth \ 8, Picture1.ScaleHeight \ 8), QBColor(2 + CBool(bBytes(X) And (2 ^ Y))), BF Next Y: Next X End Sub





Reply With Quote