Exemplo n.º 1
0
        protected override void Draw(MyCanvas TargetCanvas, int currIteration)
        {
            int absoluteX = GetAbsoluteX();
            int absoluteY = GetAbsoluteY();

            TargetCanvas.DrawRect(
                absoluteX, absoluteY, absoluteX + width, absoluteY + height,
                invertColors,
                isFilled
                );
        }
Exemplo n.º 2
0
        protected override void Draw(MyCanvas TargetCanvas, int currIteration)
        {
            // Compute the corners of the scrollbar
            int x1           = snapToParent ? ParentObject.GetAbsoluteX() + ResolveClientX() : GetAbsoluteX();
            int y1           = snapToParent ? ParentObject.GetAbsoluteY() : GetAbsoluteY();
            int x2           = x1 + width;
            int actualHeight = GetHeight();
            int y2           = y1 + actualHeight;

            // Draw the scrollbar
            TargetCanvas.DrawRect(x1, y1, x2, y2, invertColors, false);

            // Compute the coordinates of the slider
            int sliderX = x1 + 1;
            int sliderY = (int)(y1 + 1 + (posPct * ((actualHeight - 5 - 2))));

            // Draw the slider
            TargetCanvas.BitBltExt(
                StockSprites.SCROLLBAR_SLIDER,
                sliderX, sliderY,
                invertColors ? (!this.invertColors) : this.invertColors,
                false
                );
        }