public void DrawImage(NativeBmp bmp, Point[] fourCorners) { NativePixelLibInterOp.drawImage2(this.nativeCanvasPtr, bmp.Handle, fourCorners[0].X, fourCorners[0].Y, fourCorners[1].X, fourCorners[1].Y, fourCorners[2].X, fourCorners[2].Y, fourCorners[3].X, fourCorners[3].Y); }
public static void DrawImage(IntPtr canvasPtr, NativeBmp nativeBmp, int x, int y, int w, int h) { int x1 = x; int y1 = y; int x2 = x1 + w; int y2 = y1 - h; //flip coord NativePixelLibInterOp.drawImage(canvasPtr, nativeBmp.Handle, x1, y1, x2, y2); }
public static NativeCanvas CreateNativeCanvas(IntPtr windowPtr, int w, int h) { IntPtr ptr = NativePixelLibInterOp.setupMainWindow(windowPtr); NativeCanvas nativeCanvas = new NativeCanvas(ptr); nativeCanvas.w = w; nativeCanvas.h = h; if (NativePixelLibInterOp.CallServerService(ptr, ServerServiceName.Init) == 0) { //ok } return(nativeCanvas); }
public static NativeBmp CreateNativeWrapper(int bmpW, int bmpH, int stride, int bpp, IntPtr pixels) { IntPtr nbmp = NativePixelLibInterOp.makeBitmapWrapper(bmpW, bmpH, stride, bpp, pixels); return(new NativeBmp(nbmp, bmpW, bmpH)); }
public void Dispose() { NativePixelLibInterOp.CallServerService(nativeCanvasPtr, ServerServiceName.Shutdown); }
public void Render() { //render content to viewport NativePixelLibInterOp.CallServerService(nativeCanvasPtr, ServerServiceName.RefreshScreen); }
public void DrawLine(double x1, double y1, double x2, double y2) { NativePixelLibInterOp.drawLine(this.nativeCanvasPtr, x1, y1, x2, y2); }
public void SetBrushColor(Color c) { NativePixelLibInterOp.setBrushColor(this.nativeCanvasPtr, c.R, c.B, c.B, c.A); }
public void SetLineWidth(double lineWidth) { NativePixelLibInterOp.setLineWidth(this.nativeCanvasPtr, lineWidth); }
public void DrawImage(NativeBmp bmp, int x, int y, int w, int h) { NativePixelLibInterOp.DrawImage( this.nativeCanvasPtr, bmp, x, y, w, this.h - h); }
public void DrawImage(NativeBmp bmp, int x, int y) { NativePixelLibInterOp.DrawImage( this.nativeCanvasPtr, bmp, x, y, bmp.Width, this.h - bmp.Height); }
public void ClearBackground() { NativePixelLibInterOp.CallServerService(nativeCanvasPtr, ServerServiceName.Draw4); }