Esempio n. 1
0
        /// <summary>
        /// Handles draw event
        /// </summary>
        unsafe static partial void Behavior_HandleDraw(ISciterBehavior behavior, IntPtr he, IntPtr prms, ref bool handled)
        {
            var datantf = (DRAW_PARAMS *)prms;
            var e       = new DrawEventArgs(Element.Create(he))
            {
                Hdc       = datantf->hdc,
                DrawArea  = datantf->area,
                EventType = (DrawEventType)datantf->cmd
            };

            try
            {
                behavior.ProcessDraw(e);
            }
            finally
            {
                if (e.IsGraphicsCreated)
                {
                    e.ReleaseGraphics();
                }
            }

            handled = e.Handled;
        }