I have the following C# code I am trying to translate to OE.
C#:
byte[] buffer = new byte[data.Height * data.Stride];
OE ABL syntax:
oSystemByte = NEW "System.Byte[]" (Data:HEIGHT * Data:Stride).
C#:
Marshal.Copy(data.Scan0, buffer, 0, buffer.Length);
OE:
System.Runtime.InteropServices.Marshal:Copy( Data:Scan0, oSystemByte, 0, oSystemByte:Length ).
C#:
byte alpha = buffer[y * data.Stride + 4 * x + 3];
What would the OE syntax for the above be?
I have tried the following with no luck:
DEFINE VARIABLE oAlpha AS "System.Byte[]" NO-UNDO.
oAlpha:SetValue(oBuffer, (y * oData:Stride + 4 * x + 3) ).
I think this should just be;
DEFINE VARIABLE oAlpha AS System.Byte NO-UNDO.
The variable alpha is not an array.
DEFINE VARIABLE oAlpha AS System.Byte NO-UNDO will not compile. In reading docs that maps to an ABL INTEGER.
If I define iAlppha AS INT and then use the following code it does compile.
iAlpha = oSystemByte:GetValue(y * oBitmapData:Stride + 4 * x + 3).
I am testing the results.