Пример #1
0
        private static void GetPluginDescription(Type t, PluginBaseAttribute attr, out string name, out BaseBitmap bmp)
        {
            name = attr.Name;
            if (string.IsNullOrEmpty(name))
            {
                name = t.Name;
            }

            // Falback icon
            String iconFile = null;

            if (!string.IsNullOrEmpty(attr.IconFile))
            {
                iconFile = Path.Combine(Path.GetDirectoryName(t.Assembly.Location), "res", attr.IconFile);
                if (!File.Exists(iconFile))
                {
                    iconFile = null;
                }
            }
            if (string.IsNullOrEmpty(iconFile))
            {
                iconFile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
                                        "res", "CSharp.tif");
            }
            bmp = BaseBitmap.AutoBitmap(iconFile);
        }
Пример #2
0
        private static void GetPluginDescription(Type t, PluginBaseAttribute attr, out string name, out BaseBitmap bmp)
        {
            name = attr.Name;
            if (string.IsNullOrEmpty(name))
                name = t.Name;

            // Falback icon
            String iconFile = null;
            if (!string.IsNullOrEmpty(attr.IconFile))
            {
                iconFile = Path.Combine(Path.GetDirectoryName(t.Assembly.Location), "res", attr.IconFile);
                if (!File.Exists(iconFile))
                    iconFile = null;
            }
            if (string.IsNullOrEmpty(iconFile))
                iconFile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
                                        "res", "CSharp.tif");
            bmp = BaseBitmap.AutoBitmap(iconFile);
        }
Пример #3
0
 internal static HandleRef getCPtr(BaseBitmap obj) {
   return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }
Пример #4
0
 public bool CopyPartTo(BaseBitmap dst, int x, int y, int w, int h) {
   bool ret = C4dApiPINVOKE.BaseBitmap_CopyPartTo(swigCPtr, BaseBitmap.getCPtr(dst), x, y, w, h);
   return ret;
 }
Пример #5
0
 public static bool RegisterObjectPlugin(int id, string /* constString&_cstype */ str, int info, NodeDataAllocator /* DataAllocator*_cstype */ g, string /* constString&_cstype */ description, BaseBitmap icon, int disklevel) {
   bool ret = C4dApiPINVOKE.RegisterObjectPlugin(id, str, info, g /* DataAllocator*_csin */, description, BaseBitmap.getCPtr(icon), disklevel);
   if (C4dApiPINVOKE.SWIGPendingException.Pending) throw C4dApiPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
Пример #6
0
 public bool SetAlphaPixel(BaseBitmap channel, int x, int y, int val) {
   bool ret = C4dApiPINVOKE.BaseBitmap_SetAlphaPixel(swigCPtr, BaseBitmap.getCPtr(channel), x, y, val);
   return ret;
 }
Пример #7
0
 public void SetTexture(BaseBitmap bm, bool tile, DRAW_ALPHA alphamode, DRAW_TEXTUREFLAGS flags) {
   C4dApiPINVOKE.BaseDraw_SetTexture(swigCPtr, BaseBitmap.getCPtr(bm), tile, (int)alphamode, (int)flags);
 }
Пример #8
0
 public static MultipassBitmap AllocWrapper(BaseBitmap bmp) {
   IntPtr cPtr = C4dApiPINVOKE.MultipassBitmap_AllocWrapper(BaseBitmap.getCPtr(bmp));
   MultipassBitmap ret = (cPtr == IntPtr.Zero) ? null : new MultipassBitmap(cPtr, false);
   return ret;
 }
Пример #9
0
 public static bool RegisterNodePlugin(int id, string /* constString&_cstype */ str, int info, NodeDataAllocator /* DataAllocator*_cstype */ g, BaseBitmap icon, int disklevel, SWIGTYPE_p_LONG fallback) {
   bool ret = C4dApiPINVOKE.RegisterNodePlugin(id, str, info, g /* DataAllocator*_csin */, BaseBitmap.getCPtr(icon), disklevel, SWIGTYPE_p_LONG.getCPtr(fallback));
   if (C4dApiPINVOKE.SWIGPendingException.Pending) throw C4dApiPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
Пример #10
0
 public IMAGERESULT BmLoadAnimated(SWIGTYPE_p_BitmapLoaderAnimatedData bd, SWIGTYPE_p_BITMAPLOADERACTION action, BaseBitmap bm, int frame) {
   IMAGERESULT ret = (IMAGERESULT)C4dApiPINVOKE.BitmapLoaderPlugin_BmLoadAnimated(swigCPtr, SWIGTYPE_p_BitmapLoaderAnimatedData.getCPtr(bd), SWIGTYPE_p_BITMAPLOADERACTION.getCPtr(action), BaseBitmap.getCPtr(bm), frame);
   if (C4dApiPINVOKE.SWIGPendingException.Pending) throw C4dApiPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
Пример #11
0
 public static bool GetBitmapFromClipboard(BaseBitmap map) {
   bool ret = C4dApiPINVOKE.GetBitmapFromClipboard(BaseBitmap.getCPtr(map));
   return ret;
 }
Пример #12
0
 public static void FillNodePlugin(SWIGTYPE_p_NODEPLUGIN np, int info, NodeDataAllocator /* DataAllocator*_cstype */ g, BaseBitmap icon, int disklevel) {
   C4dApiPINVOKE.FillNodePlugin__SWIG_1(SWIGTYPE_p_NODEPLUGIN.getCPtr(np), info, g /* DataAllocator*_csin */, BaseBitmap.getCPtr(icon), disklevel);
 }
Пример #13
0
 public static void CopyToClipboard(BaseBitmap map, int ownerid) {
   C4dApiPINVOKE.CopyToClipboard__SWIG_1(BaseBitmap.getCPtr(map), ownerid);
 }
Пример #14
0
 public static bool ShowBitmap(BaseBitmap bm) {
   bool ret = C4dApiPINVOKE.ShowBitmap__SWIG_1(BaseBitmap.getCPtr(bm));
   return ret;
 }
Пример #15
0
 public static bool GvRegisterOperatorPlugin(int id, string /* constString&_cstype */ str, int info, NodeDataAllocator /* DataAllocator*_cstype */ at, string /* constString&_cstype */ description, int disklevel, int op_class, int op_group, int op_owner, BaseBitmap icon) {
   bool ret = C4dApiPINVOKE.GvRegisterOperatorPlugin(id, str, info, at /* DataAllocator*_csin */, description, disklevel, op_class, op_group, op_owner, BaseBitmap.getCPtr(icon));
   if (C4dApiPINVOKE.SWIGPendingException.Pending) throw C4dApiPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
Пример #16
0
 public bool CopyTo(BaseBitmap dst) {
   bool ret = C4dApiPINVOKE.BaseBitmap_CopyTo(swigCPtr, BaseBitmap.getCPtr(dst));
   return ret;
 }
Пример #17
0
 public void ScaleIt(BaseBitmap dst, int intens, bool sample, bool nprop) {
   C4dApiPINVOKE.BaseBitmap_ScaleIt(swigCPtr, BaseBitmap.getCPtr(dst), intens, sample, nprop);
 }
Пример #18
0
 public IMAGERESULT BmLoad(SWIGTYPE_p_Filename name, BaseBitmap bm, int frame) {
   IMAGERESULT ret = (IMAGERESULT)C4dApiPINVOKE.BitmapLoaderPlugin_BmLoad(swigCPtr, SWIGTYPE_p_Filename.getCPtr(name), BaseBitmap.getCPtr(bm), frame);
   if (C4dApiPINVOKE.SWIGPendingException.Pending) throw C4dApiPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
Пример #19
0
 public void ScaleBicubic(BaseBitmap dst, int src_xmin, int src_ymin, int src_xmax, int src_ymax, int dst_xmin, int dst_ymin, int dst_xmax, int dst_ymax) {
   C4dApiPINVOKE.BaseBitmap_ScaleBicubic(swigCPtr, BaseBitmap.getCPtr(dst), src_xmin, src_ymin, src_xmax, src_ymax, dst_xmin, dst_ymin, dst_xmax, dst_ymax);
 }
Пример #20
0
 public void DrawTexture(BaseBitmap bmp, ref Fusee.Math.Core.Vector3D /* Vector*&_cstype */ padr4, ref Fusee.Math.Core.Vector3D /* Vector*&_cstype */ cadr, ref Fusee.Math.Core.Vector3D /* Vector*&_cstype */ vnadr, ref Fusee.Math.Core.Vector3D /* Vector*&_cstype */ uvadr, int pntcnt, DRAW_ALPHA alphamode, DRAW_TEXTUREFLAGS flags) {
   C4dApiPINVOKE.BaseDraw_DrawTexture__SWIG_0(swigCPtr, BaseBitmap.getCPtr(bmp), ref padr4 /* Vector*&_csin */, ref cadr /* Vector*&_csin */, ref vnadr /* Vector*&_csin */, ref uvadr /* Vector*&_csin */, pntcnt, (int)alphamode, (int)flags);
 }
Пример #21
0
 public IMAGERESULT BmOpen(SWIGTYPE_p_p_PluginMovieData md, SWIGTYPE_p_Filename name, BaseBitmap bm, BaseContainer data, SAVEBIT savebits, int fps) {
   IMAGERESULT ret = (IMAGERESULT)C4dApiPINVOKE.BitmapSaverPlugin_BmOpen(swigCPtr, SWIGTYPE_p_p_PluginMovieData.getCPtr(md), SWIGTYPE_p_Filename.getCPtr(name), BaseBitmap.getCPtr(bm), BaseContainer.getCPtr(data), (int)savebits, fps);
   if (C4dApiPINVOKE.SWIGPendingException.Pending) throw C4dApiPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
Пример #22
0
 public void SetMasterAlpha(BaseBitmap master) {
   C4dApiPINVOKE.MultipassBitmap_SetMasterAlpha(swigCPtr, BaseBitmap.getCPtr(master));
 }
Пример #23
0
 public static RENDERRESULT RenderDocument(BaseDocument doc, BaseContainer rdata, SWIGTYPE_p_ProgressHook pr, SWIGTYPE_p_void private_data, BaseBitmap bmp, RENDERFLAGS renderflags, BaseThread th) {
   RENDERRESULT ret = (RENDERRESULT)C4dApiPINVOKE.RenderDocument(BaseDocument.getCPtr(doc), BaseContainer.getCPtr(rdata), SWIGTYPE_p_ProgressHook.getCPtr(pr), SWIGTYPE_p_void.getCPtr(private_data), BaseBitmap.getCPtr(bmp), (int)renderflags, BaseThread.getCPtr(th));
   if (C4dApiPINVOKE.SWIGPendingException.Pending) throw C4dApiPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
Пример #24
0
 public void RemoveChannel(BaseBitmap channel) {
   C4dApiPINVOKE.BaseBitmap_RemoveChannel(swigCPtr, BaseBitmap.getCPtr(channel));
 }
Пример #25
0
 public static bool RegisterCommandPlugin(int id, string /* constString&_cstype */ str, int info, BaseBitmap icon, string /* constString&_cstype */ help, CommandData dat) {
   bool ret = C4dApiPINVOKE.RegisterCommandPlugin(id, str, info, BaseBitmap.getCPtr(icon), help, CommandData.getCPtr(dat));
   if (C4dApiPINVOKE.SWIGPendingException.Pending) throw C4dApiPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
Пример #26
0
 public IMAGERESULT BmWrite(SWIGTYPE_p_PluginMovieData md, BaseBitmap bm) {
   IMAGERESULT ret = (IMAGERESULT)C4dApiPINVOKE.BitmapSaverPlugin_BmWrite(swigCPtr, SWIGTYPE_p_PluginMovieData.getCPtr(md), BaseBitmap.getCPtr(bm));
   return ret;
 }
Пример #27
0
 public void GetAlphaPixel(BaseBitmap channel, int x, int y, SWIGTYPE_p_UWORD val) {
   C4dApiPINVOKE.BaseBitmap_GetAlphaPixel(swigCPtr, BaseBitmap.getCPtr(channel), x, y, SWIGTYPE_p_UWORD.getCPtr(val));
 }