public override void Render(DrawingContext dc, string label, DrawDebugVisual debugVisual)
        {
            Pen  pen  = new Pen(Brushes.Blue, 1);
            Rect rect = _boundingRect;

            rect.Inflate(-1, -1);
            dc.DrawRectangle(null, pen, rect);
            if (label != null && debugVisual == DrawDebugVisual.TextRuns)
            {
                base.RenderLabel(dc, label);
            }
        }
Exemplo n.º 2
0
        //--------------------------------------------------------------------
        //
        // Public Methods
        //
        //---------------------------------------------------------------------

        #region Public Methods
#if DEBUG
        public override void Render(DrawingContext dc, string label, DrawDebugVisual debugVisual)
        {
            Pen pen = new Pen(Brushes.Red, 2);
            Rect rect = _boundingRect;
            dc.DrawRectangle(null, pen , rect);
            /*
            for (int i = 0; i < _semanticBoxes.Count; i++)
            {
                _semanticBoxes[i].Render(dc, null,debugVisual);
            }
            */
        }
Exemplo n.º 3
0
        //--------------------------------------------------------------------
        //
        // Public Methods
        //
        //---------------------------------------------------------------------

        #region Public Methods
#if DEBUG
        public override void Render(DrawingContext dc, string label, DrawDebugVisual debugVisual)
        {
            Pen  pen  = new Pen(Brushes.Red, 2);
            Rect rect = _boundingRect;

            dc.DrawRectangle(null, pen, rect);

            /*
             * for (int i = 0; i < _semanticBoxes.Count; i++)
             * {
             *  _semanticBoxes[i].Render(dc, null,debugVisual);
             * }
             */
        }
Exemplo n.º 4
0
        //--------------------------------------------------------------------
        //
        // Public Methods
        //
        //---------------------------------------------------------------------

        #region Public Methods
#if DEBUG
        public override void Render(DrawingContext dc, string label, DrawDebugVisual debugVisual)
        {
            Pen  pen  = new Pen(Brushes.Blue, 2);
            Rect rect = _boundingRect;

            rect.Inflate(3, 3);
            dc.DrawRectangle(null, pen, rect);

            if (debugVisual == DrawDebugVisual.Paragraphs && label != null)
            {
                base.RenderLabel(dc, label);
            }

            for (int i = 0; i < SemanticBoxes.Count; i++)
            {
                Debug.Assert(SemanticBoxes[i] is FixedSOMTextRun || SemanticBoxes[i] is FixedSOMImage);
                SemanticBoxes[i].Render(dc, i.ToString(), debugVisual);
            }
        }
Exemplo n.º 5
0
        //--------------------------------------------------------------------
        //
        // Public Methods
        //
        //---------------------------------------------------------------------

        #region Public Methods
#if DEBUG        
        public override void Render(DrawingContext dc, string label, DrawDebugVisual debugVisual)
        {
            Pen pen = new Pen(Brushes.Green, 5);
            Rect rect = _boundingRect;
            dc.DrawRectangle(null, pen , rect);

            FormattedText ft = new FormattedText(label, 
                                        System.Windows.Markup.TypeConverterHelper.InvariantEnglishUS,
                                        FlowDirection.LeftToRight,
                                        new Typeface("Courier New"), 
                                        20,
                                        Brushes.Blue);
            Point labelLocation = new Point(rect.Left-25, (rect.Bottom + rect.Top)/2 - 10);
          //  dc.DrawText(ft, labelLocation);            
            
            for (int i = 0; i < _semanticBoxes.Count; i++)
            {
                _semanticBoxes[i].Render(dc, label + " " + i.ToString(),debugVisual);
            }
        }
Exemplo n.º 6
0
        //--------------------------------------------------------------------
        //
        // Public Methods
        //
        //---------------------------------------------------------------------

        #region Public Methods
#if DEBUG
        public override void Render(DrawingContext dc, string label, DrawDebugVisual debugVisual)
        {
            /*
             * Pen pen = new Pen(Brushes.Red, 5);
             * Rect rect = _boundingRect;
             * dc.DrawRectangle(null, pen , rect);
             *
             * FormattedText ft = new FormattedText(String.Format("{0} columns", _semanticBoxes.Count),
             *                          TypeConverterHelper.InvariantEnglishUS,
             *                          FlowDirection.LeftToRight,
             *                          new Typeface("Courier New"),
             *                          20,
             *                          Brushes.Red);
             * Point labelLocation = new Point(rect.Right + 10, (rect.Bottom + rect.Top) / 2 - 10);
             * dc.DrawText(ft, labelLocation);
             */
            for (int i = 0; i < _semanticBoxes.Count; i++)
            {
                _semanticBoxes[i].Render(dc, label + ":" + i.ToString(), debugVisual);
            }
        }
Exemplo n.º 7
0
        //------------------------------------------------------------------- 
        //
        // Public Methods
        //
        //--------------------------------------------------------------------- 

        #region Public Methods 
#if DEBUG 
        public override void Render(DrawingContext dc, string label, DrawDebugVisual debugVisual)
        { 
            /*
            Pen pen = new Pen(Brushes.Red, 5);
            Rect rect = _boundingRect;
            dc.DrawRectangle(null, pen , rect); 

            FormattedText ft = new FormattedText(String.Format("{0} columns", _semanticBoxes.Count), 
                                        TypeConverterHelper.InvariantEnglishUS, 
                                        FlowDirection.LeftToRight,
                                        new Typeface("Courier New"), 
                                        20,
                                        Brushes.Red);
            Point labelLocation = new Point(rect.Right + 10, (rect.Bottom + rect.Top) / 2 - 10);
            dc.DrawText(ft, labelLocation); 
            */
            for (int i = 0; i < _semanticBoxes.Count; i++) 
            { 
                _semanticBoxes[i].Render(dc, label + ":" + i.ToString(), debugVisual);
            } 

        }
Exemplo n.º 8
0
        public override void Render(DrawingContext dc, string label, DrawDebugVisual debugVisual)
        {
            Pen  pen  = new Pen(Brushes.Maroon, 3);
            Rect rect = _boundingRect;

            rect.Inflate(5, 5);
            dc.DrawRectangle(null, pen, rect);

            if (label != null)
            {
                if (this.IsRTL)
                {
                    label += "R";
                }
                base.RenderLabel(dc, label);
            }

            foreach (FixedSOMSemanticBox box in _semanticBoxes)
            {
                box.Render(dc, "", debugVisual);
            }
        }
Exemplo n.º 9
0
        //--------------------------------------------------------------------
        //
        // Public Methods
        //
        //---------------------------------------------------------------------

        #region Public Methods
#if DEBUG
        public override void Render(DrawingContext dc, string label, DrawDebugVisual debugVisual)
        {
            Pen  pen  = new Pen(Brushes.Green, 5);
            Rect rect = _boundingRect;

            dc.DrawRectangle(null, pen, rect);

            FormattedText ft = new FormattedText(label,
                                                 System.Windows.Markup.TypeConverterHelper.InvariantEnglishUS,
                                                 FlowDirection.LeftToRight,
                                                 new Typeface("Courier New"),
                                                 20,
                                                 Brushes.Blue);
            Point labelLocation = new Point(rect.Left - 25, (rect.Bottom + rect.Top) / 2 - 10);

            //  dc.DrawText(ft, labelLocation);

            for (int i = 0; i < _semanticBoxes.Count; i++)
            {
                _semanticBoxes[i].Render(dc, label + " " + i.ToString(), debugVisual);
            }
        }
Exemplo n.º 10
0
        //--------------------------------------------------------------------
        //
        // Public Methods
        //
        //---------------------------------------------------------------------

        #region Public Methods
#if DEBUG
        public override void Render(DrawingContext dc, string label, DrawDebugVisual debugVisuals)
        {
            switch (debugVisuals)
            {
            case DrawDebugVisual.None:
            case DrawDebugVisual.Glyphs:     //Handled in FixedPage
                //Nothing to do
                break;

            default:
                int groupIndex = 0;
                int boxIndex   = 0;
                for (int i = 0; i < _semanticBoxes.Count; i++)
                {
                    FixedSOMGroup group = _semanticBoxes[i] as FixedSOMGroup;
                    if (group != null)
                    {
                        if (debugVisuals == DrawDebugVisual.Groups)
                        {
                            group.Render(dc, groupIndex.ToString(), debugVisuals);
                            groupIndex++;
                        }
                        List <FixedSOMSemanticBox> groupBoxes = group.SemanticBoxes;
                        for (int j = 0; j < groupBoxes.Count; j++)
                        {
                            groupBoxes[j].Render(dc, boxIndex.ToString(), debugVisuals);
                            boxIndex++;
                        }
                    }
                    else
                    {
                        _semanticBoxes[i].Render(dc, boxIndex.ToString(), debugVisuals);
                        boxIndex++;
                    }
                }
                break;
            }
        }
Exemplo n.º 11
0
        //-------------------------------------------------------------------
        //
        // Public Methods 
        //
        //--------------------------------------------------------------------- 
 
        #region Public Methods
#if DEBUG 
        public override void Render(DrawingContext dc, string label, DrawDebugVisual debugVisuals)
        {
            switch (debugVisuals)
            { 
                case DrawDebugVisual.None:
                case DrawDebugVisual.Glyphs: //Handled in FixedPage 
                    //Nothing to do 
                    break;
                default: 
                    int groupIndex = 0;
                    int boxIndex = 0;
                    for (int i=0; i<_semanticBoxes.Count; i++)
                    { 
                        FixedSOMGroup group = _semanticBoxes[i] as FixedSOMGroup;
                        if (group != null) 
                        { 
                            if (debugVisuals == DrawDebugVisual.Groups)
                            { 
                                group.Render(dc, groupIndex.ToString(),  debugVisuals);
                                groupIndex++;
                            }
                            List<FixedSOMSemanticBox> groupBoxes = group.SemanticBoxes; 
                            for (int j=0; j<groupBoxes.Count; j++)
                            { 
                                groupBoxes[j].Render(dc, boxIndex.ToString(), debugVisuals); 
                                boxIndex++;
                            } 
                        }
                        else
                        {
                            _semanticBoxes[i].Render(dc, boxIndex.ToString(), debugVisuals); 
                            boxIndex++;
                        } 
                    } 
                    break;
            } 
        }
Exemplo n.º 12
0
        public override void Render(DrawingContext dc, string label, DrawDebugVisual debugVisual)
        {
            Pen pen = new Pen(Brushes.Maroon, 3);
            Rect rect = _boundingRect;
            rect.Inflate(5,5);
            dc.DrawRectangle(null, pen , rect);
            
            if (label != null)
            {
                if (this.IsRTL)
                {
                    label += "R";
                }
                base.RenderLabel(dc, label);
            }
            
            foreach (FixedSOMSemanticBox box in _semanticBoxes)
            {
                box.Render(dc, "", debugVisual);
            }

        }
Exemplo n.º 13
0
 public override void Render(DrawingContext dc, string label, DrawDebugVisual debugVisual)
 {
     Pen pen = new Pen(Brushes.Blue, 1);
     Rect rect = _boundingRect;
     rect.Inflate(-1,-1);
     dc.DrawRectangle(null, pen , rect);
     if (label != null && debugVisual == DrawDebugVisual.TextRuns)
     {
         base.RenderLabel(dc, label);
     }
 }
Exemplo n.º 14
0
        //-------------------------------------------------------------------- 
        //
        // Public Methods
        //
        //--------------------------------------------------------------------- 
        #region Public Methods
 
#if DEBUG 
        //For visualization purposes
        public abstract void Render(DrawingContext dc, string label, DrawDebugVisual debugVisuals) ; 
Exemplo n.º 15
0
        //--------------------------------------------------------------------
        //
        // Public Methods
        //
        //---------------------------------------------------------------------
        #region Public Methods

#if DEBUG
        //For visualization purposes
        public abstract void Render(DrawingContext dc, string label, DrawDebugVisual debugVisuals);
Exemplo n.º 16
0
        //-------------------------------------------------------------------
        //
        // Public Methods 
        //
        //--------------------------------------------------------------------- 
 
        #region Public Methods
#if DEBUG 
        public override void Render(DrawingContext dc, string label, DrawDebugVisual debugVisual)
        {
            Pen pen = new Pen(Brushes.Blue, 2);
            Rect rect = _boundingRect; 
            rect.Inflate(3,3);
            dc.DrawRectangle(null, pen , rect); 
 
            if (debugVisual == DrawDebugVisual.Paragraphs && label != null)
            { 
                base.RenderLabel(dc, label);
            }

            for (int i=0; i<SemanticBoxes.Count; i++) 
            {
                Debug.Assert(SemanticBoxes[i] is FixedSOMTextRun || SemanticBoxes[i] is FixedSOMImage); 
                SemanticBoxes[i].Render(dc, i.ToString(),debugVisual); 
            }
 
        }