public override void OnDraw() { RoundedRect rectBorder = new RoundedRect(m_Bounds, m_BorderRadius); GetRenderer().Render(rectBorder, new RGBA_Bytes(0, 0, 0)); RectD insideBounds = Bounds; insideBounds.Inflate(-BorderWidth); RoundedRect rectInside = new RoundedRect(insideBounds, Math.Max(m_BorderRadius - BorderWidth, 0)); RGBA_Bytes insideColor = new RGBA_Bytes(1.0, 1.0, 1.0); if (MouseOverButton) { if (MouseDownOnButton) { insideColor = new RGBA_Bytes(255, 110, 110); } else { insideColor = new RGBA_Bytes(225, 225, 255); } } GetRenderer().Render(rectInside, insideColor); base.OnDraw(); }
public override void OnDraw() { AntiAliasedScanlineRasterizer ras = new Pictor.AntiAliasedScanlineRasterizer(); Scanline sl = new Pictor.Scanline(); RoundedRect rectBorder = new RoundedRect(m_Bounds, m_BorderRadius); GetRenderer().Render(rectBorder, new RGBA_Bytes(0, 0, 0)); RectD insideBounds = Bounds; insideBounds.Inflate(-BorderWidth); RoundedRect rectInside = new RoundedRect(insideBounds, Math.Max(m_BorderRadius - BorderWidth, 0)); RGBA_Bytes insideColor = new RGBA_Bytes(222, 222, 222); GetRenderer().Render(rectInside, insideColor); RoundedRect titleBar = new RoundedRect(new RectD(m_Bounds.Left + BorderWidth, m_Bounds.Top - BorderWidth - 20, m_Bounds.Right - BorderWidth, m_Bounds.Top - BorderWidth), m_BorderRadius); GetRenderer().Render(titleBar, new RGBA_Bytes(0, 66, 128)); base.OnDraw(); }