コード例 #1
0
ファイル: ID2D1Device.cs プロジェクト: ousttrue/ShrimpDX
        public virtual int CreatePrintControl(
            IWICImagingFactory wicFactory,
            IPrintDocumentPackageTarget documentTarget,
            ref D2D1_PRINT_CONTROL_PROPERTIES printControlProperties,
            out ID2D1PrintControl printControl
            )
        {
            var fp = GetFunctionPointer(5);

            if (m_CreatePrintControlFunc == null)
            {
                m_CreatePrintControlFunc = (CreatePrintControlFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreatePrintControlFunc));
            }
            printControl = new ID2D1PrintControl();
            return(m_CreatePrintControlFunc(m_ptr, wicFactory != null ? wicFactory.Ptr : IntPtr.Zero, documentTarget != null ? documentTarget.Ptr : IntPtr.Zero, ref printControlProperties, out printControl.PtrForNew));
        }
コード例 #2
0
        public virtual int CreateDocumentPackageTargetForPrintJob(
            ref ushort printerName,
            ref ushort jobName,
            IStream jobOutputStream,
            IStream jobPrintTicketStream,
            out IPrintDocumentPackageTarget docPackageTarget
            )
        {
            var fp = GetFunctionPointer(3);

            if (m_CreateDocumentPackageTargetForPrintJobFunc == null)
            {
                m_CreateDocumentPackageTargetForPrintJobFunc = (CreateDocumentPackageTargetForPrintJobFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateDocumentPackageTargetForPrintJobFunc));
            }
            docPackageTarget = new IPrintDocumentPackageTarget();
            return(m_CreateDocumentPackageTargetForPrintJobFunc(m_ptr, ref printerName, ref jobName, jobOutputStream != null ? jobOutputStream.Ptr : IntPtr.Zero, jobPrintTicketStream != null ? jobPrintTicketStream.Ptr : IntPtr.Zero, out docPackageTarget.PtrForNew));
        }