public static void CvPutText(IntPtr img, string text, CvPoint org, ref CvFont _font, CvScalar color) { // CvFont _font = (CvFont )Marshal.PtrToStructure(font, typeof(CvFont)); IplImage _img = (IplImage)Marshal.PtrToStructure(img, typeof(IplImage)); cvPutText(ref _img, text, org, ref _font, color); }
private static extern void cvPutText(ref IplImage img, [MarshalAs(UnmanagedType.LPStr)] String text, CvPoint org, ref CvFont font, CvScalar color);
private static extern void cvInitFont(ref CvFont font, int font_face, double hscale, double vscale, double shear, int thickness, int line_type);
public static void CvInitFont(ref CvFont _font, int font_face, double hscale, double vscale, double shear, int thickness, int line_type) { // CvFont _font = (CvFont)Marshal.PtrToStructure(font, typeof(CvFont)); cvInitFont(ref _font, font_face, hscale, vscale, shear, thickness, line_type); }