public CheckBoxWidget(double x, double y, string label)
            : base(x, y, x + 9.0 * 1.5, y + 9.0 * 1.5)
        {
            m_text_thickness = (1.5);
            m_FontSize = (9.0);
            m_status = (false);
            m_text = new GsvText();
            m_text_poly = new StrokeConverter(m_text);
            m_label = label;

            m_text_color = new RGBA_Doubles(0.0, 0.0, 0.0);
            m_inactive_color = new RGBA_Doubles(0.0, 0.0, 0.0);
            m_active_color = new RGBA_Doubles(0.4, 0.0, 0.0);
        }
Beispiel #2
0
 public TextWidget(string Text, double left, double bottom, double CapitalHeight)
     : base(0, 0, 0, 0)
 {
     m_text_color = (new RGBA_Doubles(0.0, 0.0, 0.0));
     m_BorderSize = CapitalHeight * .2;
     m_Thickness = CapitalHeight / 8;
     m_CapsHeight = CapitalHeight;
     m_text = new GsvText();
     m_text.Text = Text;
     m_text_poly = new StrokeConverter(m_text);
     m_idx = (0);
     double MinX, MinY, MaxX, MaxY;
     GetTextBounds(out MinX, out MinY, out MaxX, out MaxY);
     double FullWidth = MaxX - MinX + m_BorderSize * 2;
     double FullHeight = m_CapsHeight + m_text.AscenderHeight + m_text.DescenderHeight + m_BorderSize * 2;
     Bounds = new RectD(left, bottom, left + FullWidth, bottom + FullHeight);
 }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="PixelFormat"></param>
        /// <param name="Rasterizer"></param>
        /// <param name="Scanline"></param>
        public Renderer(IPixelFormat PixelFormat, AntiAliasedScanlineRasterizer Rasterizer, IScanline Scanline)
        {
            m_PixelFormat = PixelFormat;
            m_Rasterizer = Rasterizer;
            m_Scanline = Scanline;

            TextPath = new GsvText();
            StrockedText = new StrokeConverter(TextPath);
            m_AffineTransformStack.Push(Affine.NewIdentity());
        }
Beispiel #4
0
        public SliderWidget(double x1, double y1, double x2, double y2)
            : base(x1, y1, x2, y2)
        {
            m_border_width = 1.0;
            m_border_extra = ((y2 - y1) / 2);
            m_text_thickness = (1.0);
            m_pdx = (0.0);
            m_mouse_move = false;
            m_value = (0.5);
            m_preview_value = (0.5);
            m_min = (0.0);
            m_max = (1.0);
            m_num_steps = (0);
            m_descending = (false);
            m_ellipse = new VertexSource.Ellipse();
            m_storage = new PathStorage();
            m_text = new GsvText();
            m_text_poly = new StrokeConverter(m_text);

            CalculateBox();

            m_background_color = (new RGBA_Doubles(1.0, 0.9, 0.8));
            m_triangle_color = (new RGBA_Doubles(0.7, 0.6, 0.6));
            m_text_color = (new RGBA_Doubles(0.0, 0.0, 0.0));
            m_pointer_preview_color = (new RGBA_Doubles(0.6, 0.4, 0.4, 0.4));
            m_pointer_color = (new RGBA_Doubles(0.8, 0.0, 0.0, 0.6));
        }
Beispiel #5
0
 /// <summary>
 /// 
 /// </summary>
 public RendererBase()
 {
     TextPath = new GsvText ();
     //StrockedText = new ConvStroke (TextPath);
     affineTransformStack.Push (Affine.NewIdentity ());
 }