예제 #1
0
        public GenerateImageForm(string html)
        {
            _html = html;
            InitializeComponent();

            Icon = DemoForm.GetIcon();

            _background = HtmlRenderingHelper.CreateImageForTransparentBackground();

            foreach (var color in GetColors())
            {
                if (color != Color.Transparent)
                {
                    _backgroundColorTSB.Items.Add(color.Name);
                }
            }
            _backgroundColorTSB.SelectedItem = Color.White.Name;

            foreach (var hint in Enum.GetNames(typeof(TextRenderingHint)))
            {
                _textRenderingHintTSCB.Items.Add(hint);
            }
            _textRenderingHintTSCB.SelectedItem = TextRenderingHint.AntiAlias.ToString();

            _useGdiPlusTSB.Enabled      = !HtmlRenderingHelper.IsRunningOnMono();
            _backgroundColorTSB.Enabled = !HtmlRenderingHelper.IsRunningOnMono();
        }
예제 #2
0
        /// <summary>
        /// Init.
        /// </summary>
        public PerfForm()
        {
            InitializeComponent();

            Icon = DemoForm.GetIcon();

            StartPosition = FormStartPosition.CenterScreen;
            Size          = new Size(1200, 800);

            LoadSamples();
        }
예제 #3
0
        public SampleForm()
        {
            InitializeComponent();

            Icon = DemoForm.GetIcon();

            _htmlLabel.Text = DemoUtils.SampleHtmlLabelText;
            _htmlPanel.Text = DemoUtils.SampleHtmlPanelText;

            _background = HtmlRenderingHelper.CreateImageForTransparentBackground();
        }