/// <summary> /// Converts an ole picture into a .net image /// </summary> /// <param name="picture">The ole picture</param> /// <returns>A .net image</returns> internal Image OlePictureToImage(stdole.Picture picture) { Image image = null; switch (picture.Type) { case Ole.PICTYPE_ICON: Icon icon = (Icon)Icon.FromHandle(new IntPtr(picture.Handle)).Clone(); image = icon.ToBitmap(); break; case Ole.PICTYPE_BITMAP: image = (Image)Image.FromHbitmap(new IntPtr(picture.Handle), new IntPtr(picture.hPal)).Clone(); break; case Ole.PICTYPE_METAFILE: case Ole.PICTYPE_ENHMETAFILE: image = (Image) new Metafile(new IntPtr(picture.Handle), true).Clone(); break; case Ole.PICTYPE_NONE: case Ole.PICTYPE_UNINITIALIZED: break; default: throw new Exception("Unsupported picture type: " + picture.Type.ToString()); } return(image); }
public virtual stdole.Picture get_PictureAlphaBlended(stdole.Picture picture, stdole.Picture mask) { object[] paramsArray = Invoker.ValidateParamsArray(picture, mask); object returnItem = Invoker.PropertyGet(this, "PictureAlphaBlended", paramsArray); return(returnItem as stdole.Picture); }
public stdole.Picture GenerateSignatureLineImage(NetOffice.OfficeApi.Enums.SignatureLineImage siglnimg, NetOffice.OfficeApi.SignatureSetup psigsetup, NetOffice.OfficeApi.SignatureInfo psiginfo, object xmlDsigStream) { object[] paramsArray = Invoker.ValidateParamsArray(siglnimg, psigsetup, psiginfo, xmlDsigStream); object returnItem = Invoker.MethodReturn(this, "GenerateSignatureLineImage", paramsArray); stdole.Picture newObject = Factory.CreateObjectFromComProxy(this, returnItem) as stdole.Picture; return(newObject); }
public stdole.Picture Overlay(object key1, object key2) { object[] paramsArray = Invoker.ValidateParamsArray(key1, key2); object returnItem = Invoker.MethodReturn(this, "Overlay", paramsArray); stdole.Picture newObject = Factory.CreateObjectFromComProxy(this, returnItem) as stdole.Picture; return(newObject); }
public stdole.Picture ExtractIcon() { object[] paramsArray = null; object returnItem = Invoker.MethodReturn(this, "ExtractIcon", paramsArray); stdole.Picture newObject = NetOffice.Factory.CreateObjectFromComProxy(this, returnItem) as stdole.Picture; return(newObject); }
public stdole.Picture CreateDragImage() { object[] paramsArray = null; object returnItem = Invoker.MethodReturn(this, "CreateDragImage", paramsArray); stdole.Picture newObject = Factory.CreateObjectFromComProxy(this, returnItem) as stdole.Picture; return(newObject); }
public stdole.Picture get_PictureAlphaBlended(stdole.Picture picture, stdole.Picture mask) { object[] paramsArray = Invoker.ValidateParamsArray(picture, mask); object returnItem = Invoker.PropertyGet(this, "PictureAlphaBlended", paramsArray); stdole.Picture newObject = Factory.CreateObjectFromComProxy(this, returnItem) as stdole.Picture; return(newObject); }
public stdole.Picture GetCustomIcon() { object[] paramsArray = null; object returnItem = Invoker.MethodReturn(this, "GetCustomIcon", paramsArray); stdole.Picture newObject = Factory.CreateObjectFromComProxy(this, returnItem) as stdole.Picture; return(newObject); }
public stdole.Picture GetImageMso(string idMso, Int32 width, Int32 height) { object[] paramsArray = Invoker.ValidateParamsArray(idMso, width, height); object returnItem = Invoker.MethodReturn(this, "GetImageMso", paramsArray); stdole.Picture newObject = Factory.CreateObjectFromComProxy(this, returnItem) as stdole.Picture; return(newObject); }
public void SetCustomIcon(stdole.Picture picture) { Factory.ExecuteMethod(this, "SetCustomIcon", picture); }
public Parameter(APEIPC instance, stdole.Picture param) { Image pictureAsImage = instance.OlePictureToImage(param); Parameter paramImage = new Parameter(instance, pictureAsImage); }
public virtual void SetCustomIcon(stdole.Picture picture) { InvokerService.InvokeInternal.ExecuteMethod(this, "SetCustomIcon", picture); }
public void PictureMasked(Int32 cx1, Int32 cy1, Int32 cx2, Int32 cy2, Int32 left, Int32 top, Int32 width, Int32 height, stdole.Picture picture, stdole.Picture mask) { object[] paramsArray = Invoker.ValidateParamsArray(cx1, cy1, cx2, cy2, left, top, width, height, picture, mask); Invoker.Method(this, "PictureMasked", paramsArray); }
public stdole.Picture PictureAlphaBlended(stdole.Picture picture, stdole.Picture mask) { return(get_PictureAlphaBlended(picture, mask)); }
public virtual void PictureMasked(Int32 cx1, Int32 cy1, Int32 cx2, Int32 cy2, Int32 left, Int32 top, Int32 width, Int32 height, stdole.Picture picture, stdole.Picture mask) { InvokerService.InvokeInternal.ExecuteMethod(this, "PictureMasked", new object[] { cx1, cy1, cx2, cy2, left, top, width, height, picture, mask }); }
public void SetCustomIcon(stdole.Picture picture) { object[] paramsArray = Invoker.ValidateParamsArray(picture); Invoker.Method(this, "SetCustomIcon", paramsArray); }
public void PictureMasked(Int32 cx1, Int32 cy1, Int32 cx2, Int32 cy2, Int32 left, Int32 top, Int32 width, Int32 height, stdole.Picture picture, stdole.Picture mask) { Factory.ExecuteMethod(this, "PictureMasked", new object[] { cx1, cy1, cx2, cy2, left, top, width, height, picture, mask }); }