public Element ElementAdd(Update update, Display display, int layer, Rectangle dest_rect, Resource resource, Rectangle src_rect, Protection protection, Alpha alpha, Clamp clamp, DISPMANX_TRANSFORM_T transform)
        {
            if (update == null)
            {
                throw new ArgumentNullException(nameof(update));
            }
            if (display == null)
            {
                throw new ArgumentNullException(nameof(display));
            }
            if (resource == null)
            {
                throw new ArgumentNullException(nameof(resource));
            }
            if (protection == null)
            {
                throw new ArgumentNullException(nameof(protection));
            }

            VC_RECT_T d = new VC_RECT_T(dest_rect);
            VC_RECT_T s = new VC_RECT_T(src_rect);

            VC_DISPMANX_ALPHA_T nativeAlpha = alpha?.Native;
            DISPMANX_CLAMP_T    nativeClamp = clamp?.Native;

            DISPMANX_ELEMENT_HANDLE_T handle = NativeMethods.ElementAdd(update.Handle, display.Handle, layer, ref d, resource.Handle, ref s, protection.Handle, ref nativeAlpha, ref nativeClamp, transform);

            if (handle.Handle == IntPtr.Zero)
            {
                return(null);
            }
            return(new Element(handle));
        }
Beispiel #2
0
 public Alpha()
 {
     this.m_native = new VC_DISPMANX_ALPHA_T();
 }