예제 #1
0
        public ListItem(string aName, int x, int y, int width, int height, float round)
            : base(null, aName)
        {
            X = x;
            Y = y;

            Width  = width;
            Height = height;

            mRound = round;

            const int kSize = 20;
            const int kBias = 3;

            mText = new TextArea(this, "", null, 0, (Height - kSize) / 2 + kBias, Width, Height)
            {
                Text = "---", Size = kSize, Align = Align.Center
            };
            AddChild(mText);

            mPath  = VG.vgCreatePath(0, VGPathDatatype.VG_PATH_DATATYPE_S_16, 1, 0, 0, 0, VGPathCapabilities.VG_PATH_CAPABILITY_ALL);
            mPaint = VG.vgCreatePaint();

            mCache = VG.vgCreateImage(PixelFormat, Width, Height, VGImageQuality.VG_IMAGE_QUALITY_NONANTIALIASED);

            mIsRealUpdate = true;
        }
예제 #2
0
        public SparcButton(string aName, int x, int y, int width, int height, float round, string url)
            : base(null, aName)
        {
            X = x;
            Y = y;

            Width  = width;
            Height = height;

            mRound = round;

            //const float kColor = 252f / 256f;
            //PressColor = new Color { R = kColor, G = kColor, B = kColor };

            mPath  = VG.vgCreatePath(0, VGPathDatatype.VG_PATH_DATATYPE_S_16, 1, 0, 0, 0, VGPathCapabilities.VG_PATH_CAPABILITY_ALL);
            mPaint = VG.vgCreatePaint();

            mCache = VG.vgCreateImage(PixelFormat, Width + 2, Height + 2, VGImageQuality.VG_IMAGE_QUALITY_NONANTIALIASED);

            mIsRealUpdate = true;
            IsVisible     = true;
        }