Beispiel #1
0
        /// <summary>
        /// 绘制边线方法
        /// </summary>
        /// <param name="paint">绘图对象</param>
        /// <param name="clipRect">裁剪区域</param>
        public override void onPaintBorder(FCPaint paint, FCRect clipRect)
        {
            int    width = Width, height = Height;
            FCRect drawRect = new FCRect(0, 0, width, height);

            if (m_isEllipse)
            {
                paint.drawEllipse(getPaintingBorderColor(), 1, 0, drawRect);
            }
            else
            {
                paint.drawRect(getPaintingBorderColor(), 1, 0, drawRect);
            }
        }
Beispiel #2
0
        /// <summary>
        /// 重绘选中按钮方法
        /// </summary>
        /// <param name="paint">绘图对象</param>
        /// <param name="clipRect">裁剪区域</param>
        public override void onPaintCheckButton(FCPaint paint, FCRect clipRect)
        {
            //绘制背景图
            String bkImage = getPaintingBackImage();

            if (bkImage != null && bkImage.Length > 0)
            {
                paint.drawImage(bkImage, clipRect);
            }
            else
            {
                if (Checked)
                {
                    FCRect innerRect = new FCRect(clipRect.left + 2, clipRect.top + 2, clipRect.right - 3, clipRect.bottom - 3);
                    if (clipRect.right - clipRect.left < 4 || clipRect.bottom - clipRect.top < 4)
                    {
                        innerRect = clipRect;
                    }
                    paint.fillEllipse(getPaintingButtonBackColor(), innerRect);
                }
                paint.drawEllipse(getPaintingButtonBorderColor(), 1, 0, clipRect);
            }
        }