- Strength to Increase Rep
- +3
- Strength to Decrease Rep
- -0
- Upvotes Received
- 16
- Posts with Upvotes
- 15
- Upvoting Members
- 3
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
how can i use CopyMemory() on VB6? i have these funcion: Public Sub Clear(BGRColor As Long) Dim i As Long For i = 0 To (Width * Height) - 1 CopyMemory ByVal PixelData(0) + (i * 4), vbGreen, 4 Next i End Sub how can avoid the 'for' loop? i … | |
how can i read a file to StdPicture? and draw it on memory HDC? Public Sub LoadImage(strPath As String) Dim myPic As New StdPicture Set myPic = LoadPicture(strPath) NewImage myPic.Width, myPic.Height BitBlt MemoryHDC, 0, 0, Width, Height, myPic.Handle, 0, 0, SRCCOPY 'i get only a black background color End Sub | |
i use the RtlFillMemory(): Call RtlFillMemory(ByVal DataPtr, DIBInf.bmiHeader.biSizeImage, &H80) the '&H80' is the mid-grey color.... what are the others colors code? | |
with CreateDIBSection() we create an array of DIB's pixels .. but it's a copy and not a pointer :( when i change 1 pixel or draw a rectangle, i must re-create the DIB's and then draw the result. Private bmpPtr() As Long ReDim bmpPtr(ImageWidth * ImageHeight - 1) hBitmap = … | |
on VB6 i have these code for create a memory DC: Public Sub CreateMemoryBitmap(ByVal Width As Long, ByVal _ Height As Long) If (ImageWidth > 0 Or ImageHeight > 0) Then DeleteMemoryBitmap ImageWidth = Width ImageHeight = Height ' Create the device context. hdc = CreateCompatibleDC(ByVal 0&) If (hdc = … | |
i can create a DDA algoritm.. but pixel a pixel. so what is the best speed for it? IncrementPixel = 2 For RayAngle = StartAngle To EndAngle Step IncrementAngle Distance = 0 Wall = 0 RayActualX = RayX RayActualY = RayY IncrementStepSin = Sin(RayAngle) * IncrementPixel IncrementStepCos = Cos(RayAngle) * … | |
i did these code for create RayCasting: Option Explicit Private Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long) Private Const PI As Double = 3.14159265358979 Dim LevelMap(12) As Variant Dim CamWidth As Long Dim CamHeight As Long Dim CamHalfHeight As Long Dim RayCastingPrecision As Long Dim PlayerX As Double … | |
VB6 : is possible convert radians to pixels? the WindowViewe is 200 pixels. so i need draw 200 lines between PlayerAngle(100 pixels) to 200. but how can i convert pixels to Radians... the PlayerAngle is the 100 pixel(the half of WindowViewe) Private Sub rayCasting() Dim rayAngle As Double Dim IncreRayAngle … | |
I need learn more about processing pixels like alphablend, stretch and more. I did several search without results. Can anyone recommend me any page or book or some math? |