mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-26 08:04:01 -06:00
Add the full source of BambuStudio
using version 1.0.10
This commit is contained in:
parent
30bcadab3e
commit
1555904bef
3771 changed files with 1251328 additions and 0 deletions
34
src/slic3r/GUI/Widgets/RoundedRectangle.cpp
Normal file
34
src/slic3r/GUI/Widgets/RoundedRectangle.cpp
Normal file
|
@ -0,0 +1,34 @@
|
|||
#include "RoundedRectangle.hpp"
|
||||
#include "../wxExtensions.hpp"
|
||||
#include <wx/dcgraph.h>
|
||||
|
||||
BEGIN_EVENT_TABLE(RoundedRectangle, wxPanel)
|
||||
EVT_PAINT(RoundedRectangle::OnPaint)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
RoundedRectangle::RoundedRectangle(wxWindow *parent, wxColour col, wxPoint pos, wxSize size, double radius, int type)
|
||||
: wxWindow(parent, wxID_ANY, pos, size, wxBORDER_NONE)
|
||||
{
|
||||
SetBackgroundColour(wxColour(255,255,255));
|
||||
m_type = type;
|
||||
m_color = col;
|
||||
m_radius = radius;
|
||||
}
|
||||
|
||||
void RoundedRectangle::OnPaint(wxPaintEvent &evt)
|
||||
{
|
||||
//draw RoundedRectangle
|
||||
if (m_type == 0) {
|
||||
wxPaintDC dc(this);
|
||||
dc.SetPen(*wxTRANSPARENT_PEN);
|
||||
dc.SetBrush(wxBrush(m_color));
|
||||
dc.DrawRoundedRectangle(0, 0, GetSize().GetWidth(), GetSize().GetHeight(), m_radius);
|
||||
}
|
||||
|
||||
//draw RoundedRectangle only board
|
||||
if (m_type == 1) {
|
||||
wxPaintDC dc(this);
|
||||
dc.SetPen(m_color);
|
||||
dc.DrawRoundedRectangle(0, 0, GetSize().GetWidth(), GetSize().GetHeight(), m_radius);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue