Exemple #1
0
        private CodePiece GenerateCode_Display(CodePiece val)
        {
            MathExt.Point s = new MathExt.Point(DisplayWidth, DisplayHeight);

            int b = CGO.DisplayBorderThickness;

            CodePiece p = new CodePiece();

            if (s.Size == 0)
            {
                return(p);
            }

            p.SetAt(b, b, val);

            // 44111111
            // 44111111
            // 44    22
            // 44    22
            // 44    22
            // 44    22
            // 33333322
            // 33333322

            p.Fill(b, 0, s.X + 2 * b, b, BCHelper.Chr(CGO.DisplayBorder));                                      // 1
            p.Fill(s.X + b, b, s.X + 2 * b, s.Y + 2 * b, BCHelper.Chr(CGO.DisplayBorder));                      // 2
            p.Fill(0, s.Y + b, s.X + b, s.Y + 2 * b, BCHelper.Chr(CGO.DisplayBorder));                          // 3
            p.Fill(0, 0, b, s.Y + b, BCHelper.Chr(CGO.DisplayBorder));                                          // 4

            p.SetTag(0, 0, new DisplayTopLeftTag(this, DisplayWidth + 2 * b, DisplayHeight + 2 * b));

            return(p);
        }
Exemple #2
0
 public VarDeclarationPosition(MathExt.Point p, int w, int h, int s)
 {
     X      = p.X;
     Y      = p.Y;
     Width  = w;
     Height = h;
     Size   = s;
 }