コード例 #1
0
        protected override bool OnDraw(SciterElement se, SciterXBehaviors.DRAW_PARAMS prms)
        {
            if (prms.cmd == SciterXBehaviors.DRAW_EVENTS.DRAW_CONTENT)
            {
                SciterText txt = SciterText.Create("hi", se._he);

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

                return(true);
            }
            return(false);
        }
コード例 #2
0
        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);
        }