public static void DrawRectangle(Array2DBase image, Rectangle rect, RgbAlphaPixel color, uint thickness = 1) { if (image == null) { throw new ArgumentNullException(nameof(image)); } image.ThrowIfDisposed(); using (var native = rect.ToNative()) { var ret = Native.draw_rectangle( Native.Array2DType.RgbAlphaPixel, image.NativePtr, native.NativePtr, ref color, thickness); switch (ret) { case Native.ErrorType.ArrayTypeNotSupport: throw new ArgumentException($"{color} is not supported."); } } }
public MModRect(Rectangle rectangle) { using (var native = rectangle.ToNative()) this.NativePtr = NativeMethods.mmod_rect_new2(native.NativePtr); }
public ChipDetails(Rectangle rect) { using (var tmp = rect.ToNative()) this.NativePtr = NativeMethods.chip_details_new6(tmp.NativePtr); }
public FullObjectDetection(Rectangle rectangle) { using (var native = rectangle.ToNative()) this.NativePtr = NativeMethods.full_object_detection_new2(native.NativePtr); this._Parts = NativeMethods.full_object_detection_num_parts(this.NativePtr); }