Inheritance: IDisposable
        protected override bool OnDraw(SciterElement se, SciterXBehaviors.DRAW_PARAMS prms)
        {
            if(prms.cmd == SciterXBehaviors.DRAW_EVENTS.DRAW_CONTENT)
            {
                using(SciterGraphics g = new SciterGraphics(prms.gfx))
                {
                    g.StateSave();
                    g.Translate(prms.area.left, prms.area.top);

                    List<Tuple<float, float>> points = new List<Tuple<float, float>>
                    {
                        Tuple.Create(100.0f, 0.0f),
                        Tuple.Create(150.0f, 150.0f),
                        Tuple.Create(50.0f, 150.0f)
                    };

                    g.LineColor = Color.Blue;
                    g.FillColor = Color.Red;
                    g.LineWidth = 5;
                    g.Polygon(points);
                    g.Ellipse(200, 50, 50, 50);

                    g.StateRestore();
                }

                return true;
            }
            return false;
        }
        protected override bool OnDraw(SciterElement se, SciterXBehaviors.DRAW_PARAMS prms)
        {
            var b = new Bitmap(406, 400);
            using(var g = Graphics.FromImage(b))
            {
                LinearGradientBrush linGrBrush = new LinearGradientBrush(
                    new Point(0, 10),
                    new Point(200, 10),
                    Color.FromArgb(255, 255, 0, 0),   // Opaque red
                    Color.FromArgb(255, 0, 0, 255));  // Opaque blue
                g.SmoothingMode = SmoothingMode.AntiAlias;
                g.FillEllipse(linGrBrush, 0, 30, 200, 100);
            }

            var img = new SciterImage(b);
            var gfx = new SciterGraphics(prms.gfx);
            gfx.BlendImage(img, 0, 0);
            return true;
        }
        protected override bool OnDraw(SciterElement se, SciterXBehaviors.DRAW_PARAMS prms)
        {
            if(prms.cmd == SciterXBehaviors.DRAW_EVENTS.DRAW_CONTENT)
            {
                SciterText txt = SciterText.Create("hi", new SciterXGraphics.SCITER_TEXT_FORMAT
                {
                    fontFamily = "Arial",
                    fontSize = 15,
                    fontWeight = 400,
                    lineHeight = 30
                });

                using(SciterGraphics g = new SciterGraphics(prms.gfx))
                {
                    g.DrawText(txt, 0, 0, 7);
                }

                return true;
            }
            return false;
        }