/[gr2lib]/trunk/gr2lib/core/coretypes/implementation/Pixel.cs
ViewVC logotype

Contents of /trunk/gr2lib/core/coretypes/implementation/Pixel.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 73 - (show annotations) (download)
Thu Jul 15 14:31:59 2010 UTC (11 years, 6 months ago) by william
File size: 940 byte(s)
setup default constructors to initialize each class to its default values

1 using System;
2 using System.Collections.Generic;
3 using System.Text;
4 using gr2lib.core.helpers;
5
6 namespace gr2lib.core.coretypes.implementation
7 {
8 public class Pixel
9 {
10 public byte UInt8;
11
12 public IntPtr NativePointer;
13
14 public Pixel()
15 {
16 this.UInt8 = 0;
17 this.NativePointer = IntPtr.Zero;
18 }
19 internal static Pixel ReadFromMemory(IntPtr pointer)
20 {
21 if (pointer == IntPtr.Zero) return null;
22 native.Pixel native = Helpers.ReadFromMemory<native.Pixel>(pointer);
23 Pixel managed = ReadFromNative(native);
24 managed.NativePointer = pointer;
25 return managed;
26 }
27
28 internal static Pixel ReadFromNative(native.Pixel native)
29 {
30 Pixel managed = new Pixel();
31 managed.UInt8 = native.UInt8;
32 return managed;
33 }
34 }
35 }

  ViewVC Help
Powered by ViewVC 1.1.22