All tools now converted to use new net objects
This commit is contained in:
parent
45ba26446a
commit
7d1671229b
62 changed files with 492 additions and 481 deletions
|
|
@ -29,8 +29,8 @@ void BrushStrokeCanvasComponent::load_file(cereal::PortableBinaryInputArchive& a
|
|||
a(d->points, d->color, d->hasRoundCaps);
|
||||
}
|
||||
|
||||
CanvasComponent::CompType BrushStrokeCanvasComponent::get_type() const {
|
||||
return CompType::BRUSHSTROKE;
|
||||
CanvasComponentType BrushStrokeCanvasComponent::get_type() const {
|
||||
return CanvasComponentType::BRUSHSTROKE;
|
||||
}
|
||||
|
||||
void BrushStrokeCanvasComponent::draw(SkCanvas* canvas, const DrawData& drawData) const {
|
||||
|
|
@ -46,6 +46,11 @@ void BrushStrokeCanvasComponent::draw(SkCanvas* canvas, const DrawData& drawData
|
|||
canvas->restore();
|
||||
}
|
||||
|
||||
void BrushStrokeCanvasComponent::set_data_from(const CanvasComponent& other) {
|
||||
auto& otherStroke = static_cast<const BrushStrokeCanvasComponent&>(other);
|
||||
d = otherStroke.d;
|
||||
}
|
||||
|
||||
void BrushStrokeCanvasComponent::initialize_draw_data(DrawingProgram& drawP) {
|
||||
if(!d->points.empty()) {
|
||||
std::vector<BrushStrokeCanvasComponentPoint> points = smooth_points(0, d->points.size() - 1, DEFAULT_SMOOTHNESS);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue