mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00
fix compiler warnings on MacOS
warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
This commit is contained in:
parent
89db13037d
commit
f2fdc380b4
51 changed files with 266 additions and 266 deletions
|
@ -55,9 +55,9 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
return true;
|
||||
};
|
||||
|
||||
picture = accessor->set(move(picture), f);
|
||||
picture = accessor->set(std::move(picture), f);
|
||||
|
||||
canvas->push(move(picture));
|
||||
canvas->push(std::move(picture));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -38,13 +38,13 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
auto bg = tvg::Shape::gen();
|
||||
bg->appendRect(0,0,WIDTH, HEIGHT,0, 0);
|
||||
bg->fill(255, 255, 255, 255);
|
||||
canvas->push(move(bg));
|
||||
canvas->push(std::move(bg));
|
||||
|
||||
// image
|
||||
auto picture1 = tvg::Picture::gen();
|
||||
picture1->load(EXAMPLE_DIR"/cartman.svg");
|
||||
picture1->size(400, 400);
|
||||
canvas->push(move(picture1));
|
||||
canvas->push(std::move(picture1));
|
||||
|
||||
auto picture2 = tvg::Picture::gen();
|
||||
picture2->load(EXAMPLE_DIR"/logo.svg");
|
||||
|
@ -58,15 +58,15 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
maskShape->stroke(25, 25, 25, 255);
|
||||
maskShape->stroke(tvg::StrokeJoin::Round);
|
||||
maskShape->stroke(10);
|
||||
canvas->push(move(maskShape));
|
||||
canvas->push(std::move(maskShape));
|
||||
|
||||
auto mask = tvg::Shape::gen();
|
||||
pMask = mask.get();
|
||||
mask->appendCircle(180, 180, 75, 75);
|
||||
mask->fill(255, 255, 255, 255); //AlphaMask RGB channels are unused.
|
||||
|
||||
picture2->composite(move(mask), tvg::CompositeMethod::AlphaMask);
|
||||
if (canvas->push(move(picture2)) != tvg::Result::Success) return;
|
||||
picture2->composite(std::move(mask), tvg::CompositeMethod::AlphaMask);
|
||||
if (canvas->push(std::move(picture2)) != tvg::Result::Success) return;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -35,38 +35,38 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape1->appendArc(150, 150, 80, 10, 180, false);
|
||||
shape1->stroke(255, 255, 255, 255);
|
||||
shape1->stroke(2);
|
||||
if (canvas->push(move(shape1)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape1)) != tvg::Result::Success) return;
|
||||
|
||||
auto shape2 = tvg::Shape::gen();
|
||||
shape2->appendArc(400, 150, 80, 0, 300, false);
|
||||
shape2->stroke(255, 255, 255, 255);
|
||||
shape2->stroke(2);
|
||||
if (canvas->push(move(shape2)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape2)) != tvg::Result::Success) return;
|
||||
|
||||
auto shape3 = tvg::Shape::gen();
|
||||
shape3->appendArc(600, 150, 80, 300, 60, false);
|
||||
shape3->stroke(255, 255, 255, 255);
|
||||
shape3->stroke(2);
|
||||
if (canvas->push(move(shape3)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape3)) != tvg::Result::Success) return;
|
||||
|
||||
//Pie Line
|
||||
auto shape4 = tvg::Shape::gen();
|
||||
shape4->appendArc(150, 400, 80, 10, 180, true);
|
||||
shape4->stroke(255, 255, 255, 255);
|
||||
shape4->stroke(2);
|
||||
if (canvas->push(move(shape4)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape4)) != tvg::Result::Success) return;
|
||||
|
||||
auto shape5 = tvg::Shape::gen();
|
||||
shape5->appendArc(400, 400, 80, 0, 300, true);
|
||||
shape5->stroke(255, 255, 255, 255);
|
||||
shape5->stroke(2);
|
||||
if (canvas->push(move(shape5)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape5)) != tvg::Result::Success) return;
|
||||
|
||||
auto shape6 = tvg::Shape::gen();
|
||||
shape6->appendArc(600, 400, 80, 300, 60, true);
|
||||
shape6->stroke(255, 255, 255, 255);
|
||||
shape6->stroke(2);
|
||||
if (canvas->push(move(shape6)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape6)) != tvg::Result::Success) return;
|
||||
|
||||
//Pie Fill
|
||||
auto shape7 = tvg::Shape::gen();
|
||||
|
@ -74,21 +74,21 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape7->fill(255, 255, 255, 255);
|
||||
shape7->stroke(255, 0, 0, 255);
|
||||
shape7->stroke(2);
|
||||
if (canvas->push(move(shape7)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape7)) != tvg::Result::Success) return;
|
||||
|
||||
auto shape8 = tvg::Shape::gen();
|
||||
shape8->appendArc(400, 650, 80, 0, 300, true);
|
||||
shape8->fill(255, 255, 255, 255);
|
||||
shape8->stroke(255, 0, 0, 255);
|
||||
shape8->stroke(2);
|
||||
if (canvas->push(move(shape8)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape8)) != tvg::Result::Success) return;
|
||||
|
||||
auto shape9 = tvg::Shape::gen();
|
||||
shape9->appendArc(600, 650, 80, 300, 60, true);
|
||||
shape9->fill(255, 255, 255, 255);
|
||||
shape9->stroke(255, 0, 0, 255);
|
||||
shape9->stroke(2);
|
||||
if (canvas->push(move(shape9)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape9)) != tvg::Result::Success) return;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
|
|
|
@ -66,9 +66,9 @@ bool tvgUpdateCmds(tvg::Canvas* canvas)
|
|||
colorStops[2] = {2, uint8_t(rand() % 255), uint8_t(rand() % 255), uint8_t(rand() % 255), 255};
|
||||
|
||||
fill->colorStops(colorStops, 3);
|
||||
shape->fill(move(fill));
|
||||
shape->fill(std::move(fill));
|
||||
|
||||
if (canvas->push(move(shape)) != tvg::Result::Success) {
|
||||
if (canvas->push(std::move(shape)) != tvg::Result::Success) {
|
||||
//Did you call clear()? Make it sure if canvas is on rendering
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -36,19 +36,19 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
auto shape1 = tvg::Shape::gen();
|
||||
shape1->appendRect(0, 0, 400, 400, 50, 50); //x, y, w, h, rx, ry
|
||||
shape1->fill(0, 255, 0, 255); //r, g, b, a
|
||||
if (canvas->push(move(shape1)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape1)) != tvg::Result::Success) return;
|
||||
|
||||
//Prepare Circle
|
||||
auto shape2 = tvg::Shape::gen();
|
||||
shape2->appendCircle(400, 400, 200, 200); //cx, cy, radiusW, radiusH
|
||||
shape2->fill(255, 255, 0, 170); //r, g, b, a
|
||||
if (canvas->push(move(shape2)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape2)) != tvg::Result::Success) return;
|
||||
|
||||
//Prepare Ellipse
|
||||
auto shape3 = tvg::Shape::gen();
|
||||
shape3->appendCircle(400, 400, 250, 100); //cx, cy, radiusW, radiusH
|
||||
shape3->fill(255, 255, 255, 100); //r, g, b, a
|
||||
if (canvas->push(move(shape3)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape3)) != tvg::Result::Success) return;
|
||||
|
||||
//Prepare Star
|
||||
auto shape4 = tvg::Shape::gen();
|
||||
|
@ -64,13 +64,13 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape4->lineTo(146, 343);
|
||||
shape4->close();
|
||||
shape4->fill(255, 0, 200, 200);
|
||||
if (canvas->push(move(shape4)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape4)) != tvg::Result::Success) return;
|
||||
|
||||
//Prepare Opaque Ellipse
|
||||
auto shape5 = tvg::Shape::gen();
|
||||
shape5->appendCircle(600, 650, 200, 150);
|
||||
shape5->fill(0, 0, 255, 255);
|
||||
if (canvas->push(move(shape5)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape5)) != tvg::Result::Success) return;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
auto shape = tvg::Shape::gen();
|
||||
shape->appendRect(0, 0, WIDTH, HEIGHT, 0, 0);
|
||||
shape->fill(255, 255, 255, 255);
|
||||
if (canvas->push(move(shape)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape)) != tvg::Result::Success) return;
|
||||
|
||||
//////////////////////////////////////////////
|
||||
auto scene = tvg::Scene::gen();
|
||||
|
@ -68,7 +68,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
clipStar->appendCircle(200, 230, 110, 110);
|
||||
clipStar->translate(10, 10);
|
||||
|
||||
star1->composite(move(clipStar), tvg::CompositeMethod::ClipPath);
|
||||
star1->composite(std::move(clipStar), tvg::CompositeMethod::ClipPath);
|
||||
|
||||
auto star2 = tvg::Shape::gen();
|
||||
tvgDrawStar(star2.get());
|
||||
|
@ -85,13 +85,13 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
clip->appendCircle(200, 230, 130, 130);
|
||||
clip->translate(10, 10);
|
||||
|
||||
scene->push(move(star1));
|
||||
scene->push(move(star2));
|
||||
scene->push(std::move(star1));
|
||||
scene->push(std::move(star2));
|
||||
|
||||
//Clipping scene to shape
|
||||
scene->composite(move(clip), tvg::CompositeMethod::ClipPath);
|
||||
scene->composite(std::move(clip), tvg::CompositeMethod::ClipPath);
|
||||
|
||||
canvas->push(move(scene));
|
||||
canvas->push(std::move(scene));
|
||||
|
||||
//////////////////////////////////////////////
|
||||
auto star3 = tvg::Shape::gen();
|
||||
|
@ -104,7 +104,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
colorStops[0] = {0, 0, 0, 0, 255};
|
||||
colorStops[1] = {1, 255, 255, 255, 255};
|
||||
fill->colorStops(colorStops, 2);
|
||||
star3->fill(move(fill));
|
||||
star3->fill(std::move(fill));
|
||||
|
||||
star3->stroke(255 ,0, 0, 255);
|
||||
star3->stroke(10);
|
||||
|
@ -116,9 +116,9 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
clipRect->translate(20, 20);
|
||||
|
||||
//Clipping scene to rect(shape)
|
||||
star3->composite(move(clipRect), tvg::CompositeMethod::ClipPath);
|
||||
star3->composite(std::move(clipRect), tvg::CompositeMethod::ClipPath);
|
||||
|
||||
canvas->push(move(star3));
|
||||
canvas->push(std::move(star3));
|
||||
|
||||
//////////////////////////////////////////////
|
||||
auto picture = tvg::Picture::gen();
|
||||
|
@ -134,9 +134,9 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
clipPath->translate(20, 20);
|
||||
|
||||
//Clipping picture to path
|
||||
picture->composite(move(clipPath), tvg::CompositeMethod::ClipPath);
|
||||
picture->composite(std::move(clipPath), tvg::CompositeMethod::ClipPath);
|
||||
|
||||
canvas->push(move(picture));
|
||||
canvas->push(std::move(picture));
|
||||
|
||||
//////////////////////////////////////////////
|
||||
auto shape1 = tvg::Shape::gen();
|
||||
|
@ -148,9 +148,9 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
clipShape->appendRect(600, 420, 100, 100, 0, 0);
|
||||
|
||||
//Clipping shape1 to clipShape
|
||||
shape1->composite(move(clipShape), tvg::CompositeMethod::ClipPath);
|
||||
shape1->composite(std::move(clipShape), tvg::CompositeMethod::ClipPath);
|
||||
|
||||
canvas->push(move(shape1));
|
||||
canvas->push(std::move(shape1));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ void tvgUpdateCmds(tvg::Canvas* canvas, float progress)
|
|||
|
||||
shape->transform(m);
|
||||
|
||||
canvas->push(move(shape));
|
||||
canvas->push(std::move(shape));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
//fill property will be retained
|
||||
bg->fill(255, 255, 255, 255);
|
||||
|
||||
if (canvas->push(move(bg)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(bg)) != tvg::Result::Success) return;
|
||||
|
||||
//Shape
|
||||
auto shape = tvg::Shape::gen();
|
||||
|
@ -54,7 +54,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape->stroke(0, 0, 255, 255);
|
||||
shape->stroke(1);
|
||||
|
||||
if (canvas->push(move(shape)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape)) != tvg::Result::Success) return;
|
||||
}
|
||||
|
||||
void tvgUpdateCmds(tvg::Canvas* canvas, float progress)
|
||||
|
|
|
@ -57,15 +57,15 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
colorStops[1] = {1, 255, 255, 255, 255};
|
||||
fill->colorStops(colorStops, 2);
|
||||
|
||||
shape2->fill(move(fill));
|
||||
shape2->fill(std::move(fill));
|
||||
|
||||
//Duplicate Shape 2
|
||||
auto shape3 = tvg::cast<tvg::Shape>(shape2->duplicate());
|
||||
shape3->translate(0, 440);
|
||||
|
||||
canvas->push(move(shape1));
|
||||
canvas->push(move(shape2));
|
||||
canvas->push(move(shape3));
|
||||
canvas->push(std::move(shape1));
|
||||
canvas->push(std::move(shape2));
|
||||
canvas->push(std::move(shape3));
|
||||
}
|
||||
|
||||
//Duplicate Scene
|
||||
|
@ -77,17 +77,17 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
auto shape1 = tvg::Shape::gen();
|
||||
shape1->appendRect(0, 0, 400, 400, 50, 50);
|
||||
shape1->fill(0, 255, 0, 255);
|
||||
scene1->push(move(shape1));
|
||||
scene1->push(std::move(shape1));
|
||||
|
||||
auto shape2 = tvg::Shape::gen();
|
||||
shape2->appendCircle(400, 400, 200, 200);
|
||||
shape2->fill(255, 255, 0, 255);
|
||||
scene1->push(move(shape2));
|
||||
scene1->push(std::move(shape2));
|
||||
|
||||
auto shape3 = tvg::Shape::gen();
|
||||
shape3->appendCircle(600, 600, 150, 100);
|
||||
shape3->fill(0, 255, 255, 255);
|
||||
scene1->push(move(shape3));
|
||||
scene1->push(std::move(shape3));
|
||||
|
||||
scene1->scale(0.25);
|
||||
scene1->translate(400, 0);
|
||||
|
@ -96,8 +96,8 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
auto scene2 = tvg::cast<tvg::Scene>(scene1->duplicate());
|
||||
scene2->translate(600, 0);
|
||||
|
||||
canvas->push(move(scene1));
|
||||
canvas->push(move(scene2));
|
||||
canvas->push(std::move(scene1));
|
||||
canvas->push(std::move(scene2));
|
||||
}
|
||||
|
||||
//Duplicate Picture - svg
|
||||
|
@ -110,8 +110,8 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
auto picture2 = tvg::cast<tvg::Picture>(picture1->duplicate());
|
||||
picture2->translate(550, 250);
|
||||
|
||||
canvas->push(move(picture1));
|
||||
canvas->push(move(picture2));
|
||||
canvas->push(std::move(picture1));
|
||||
canvas->push(std::move(picture2));
|
||||
}
|
||||
|
||||
//Duplicate Picture - raw
|
||||
|
@ -133,8 +133,8 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
picture2->scale(0.7);
|
||||
picture2->rotate(8);
|
||||
|
||||
canvas->push(move(picture1));
|
||||
canvas->push(move(picture2));
|
||||
canvas->push(std::move(picture1));
|
||||
canvas->push(std::move(picture2));
|
||||
|
||||
free(data);
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape1->fill(255, 255, 255, 255);
|
||||
shape1->fill(tvg::FillRule::Winding); //Fill all winding shapes
|
||||
|
||||
if (canvas->push(move(shape1)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape1)) != tvg::Result::Success) return;
|
||||
|
||||
//Star 2
|
||||
auto shape2 = tvg::Shape::gen();
|
||||
|
@ -54,7 +54,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape2->fill(255, 255, 255, 255);
|
||||
shape2->fill(tvg::FillRule::EvenOdd); //Fill polygons with even odd pattern
|
||||
|
||||
if (canvas->push(move(shape2)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape2)) != tvg::Result::Success) return;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
|
|
|
@ -46,10 +46,10 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
colorStops[0] = {0,0,0,0,255};
|
||||
colorStops[1] = {1,255,255,255,255};
|
||||
fill->colorStops(colorStops,2);
|
||||
shape->fill(move(fill));
|
||||
shape->fill(std::move(fill));
|
||||
|
||||
shape->composite(move(mask), tvg::CompositeMethod::AlphaMask);
|
||||
canvas->push(move(shape));
|
||||
shape->composite(std::move(mask), tvg::CompositeMethod::AlphaMask);
|
||||
canvas->push(std::move(shape));
|
||||
|
||||
//-------------------------------------------
|
||||
|
||||
|
@ -78,10 +78,10 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
colorStops1[0] = {0,0,0,0,255};
|
||||
colorStops1[1] = {1,1,255,255,255};
|
||||
fill1->colorStops(colorStops1,2);
|
||||
shape1->fill(move(fill1));
|
||||
shape1->fill(std::move(fill1));
|
||||
|
||||
shape1->composite(move(mask1), tvg::CompositeMethod::AlphaMask);
|
||||
canvas->push(move(shape1));
|
||||
shape1->composite(std::move(mask1), tvg::CompositeMethod::AlphaMask);
|
||||
canvas->push(std::move(shape1));
|
||||
|
||||
//-------------------------------------------
|
||||
|
||||
|
@ -100,10 +100,10 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
colorStops2[0] = {0,0,0,0,255};
|
||||
colorStops2[1] = {1,255,255,255,255};
|
||||
fill2->colorStops(colorStops2,2);
|
||||
shape2->fill(move(fill2));
|
||||
shape2->fill(std::move(fill2));
|
||||
|
||||
shape2->composite(move(mask2), tvg::CompositeMethod::InvAlphaMask);
|
||||
canvas->push(move(shape2));
|
||||
shape2->composite(std::move(mask2), tvg::CompositeMethod::InvAlphaMask);
|
||||
canvas->push(std::move(shape2));
|
||||
|
||||
//-------------------------------------------
|
||||
|
||||
|
@ -132,10 +132,10 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
colorStops3[0] = {0,0,0,0,255};
|
||||
colorStops3[1] = {1,1,255,255,255};
|
||||
fill3->colorStops(colorStops3,2);
|
||||
shape3->fill(move(fill3));
|
||||
shape3->fill(std::move(fill3));
|
||||
|
||||
shape3->composite(move(mask3), tvg::CompositeMethod::InvAlphaMask);
|
||||
canvas->push(move(shape3));
|
||||
shape3->composite(std::move(mask3), tvg::CompositeMethod::InvAlphaMask);
|
||||
canvas->push(std::move(shape3));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -68,14 +68,14 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
auto fillStroke1 = tvg::LinearGradient::gen();
|
||||
fillStroke1->linear(100, 100, 250, 250);
|
||||
fillStroke1->colorStops(colorStops1, 3);
|
||||
shape1->stroke(move(fillStroke1));
|
||||
shape1->stroke(std::move(fillStroke1));
|
||||
|
||||
auto fill1 = tvg::LinearGradient::gen();
|
||||
fill1->linear(100, 100, 250, 250);
|
||||
fill1->colorStops(colorStops1, 3);
|
||||
shape1->fill(move(fill1));
|
||||
shape1->fill(std::move(fill1));
|
||||
|
||||
if (canvas->push(move(shape1)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape1)) != tvg::Result::Success) return;
|
||||
|
||||
// radial gradient stroke + duplicate
|
||||
auto shape2 = tvg::Shape::gen();
|
||||
|
@ -85,7 +85,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
auto fillStroke2 = tvg::RadialGradient::gen();
|
||||
fillStroke2->radial(600, 175, 100);
|
||||
fillStroke2->colorStops(colorStops2, 2);
|
||||
shape2->stroke(move(fillStroke2));
|
||||
shape2->stroke(std::move(fillStroke2));
|
||||
|
||||
auto shape3 = tvg::cast<tvg::Shape>(shape2->duplicate());
|
||||
shape3->translate(0, 200);
|
||||
|
@ -93,14 +93,14 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
auto fillStroke3 = tvg::LinearGradient::gen();
|
||||
fillStroke3->linear(500, 115, 700, 235);
|
||||
fillStroke3->colorStops(colorStops3, 2);
|
||||
shape3->stroke(move(fillStroke3));
|
||||
shape3->stroke(std::move(fillStroke3));
|
||||
|
||||
auto shape4 = tvg::cast<tvg::Shape>(shape2->duplicate());
|
||||
shape4->translate(0, 400);
|
||||
|
||||
if (canvas->push(move(shape2)) != tvg::Result::Success) return;
|
||||
if (canvas->push(move(shape3)) != tvg::Result::Success) return;
|
||||
if (canvas->push(move(shape4)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape2)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape3)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape4)) != tvg::Result::Success) return;
|
||||
|
||||
// dashed gradient stroke
|
||||
auto shape5 = tvg::Shape::gen();
|
||||
|
@ -112,15 +112,15 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
auto fillStroke5 = tvg::LinearGradient::gen();
|
||||
fillStroke5->linear(150, 450, 450, 750);
|
||||
fillStroke5->colorStops(colorStops3, 2);
|
||||
shape5->stroke(move(fillStroke5));
|
||||
shape5->stroke(std::move(fillStroke5));
|
||||
|
||||
auto fill5 = tvg::LinearGradient::gen();
|
||||
fill5->linear(150, 450, 450, 750);
|
||||
fill5->colorStops(colorStops3, 2);
|
||||
shape5->fill(move(fill5));
|
||||
shape5->fill(std::move(fill5));
|
||||
shape5->scale(0.8);
|
||||
|
||||
if (canvas->push(move(shape5)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape5)) != tvg::Result::Success) return;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -50,14 +50,14 @@ void tvgUpdateCmds(tvg::Canvas* canvas, float progress)
|
|||
colorStops[2] = {1, 255, 255, 255, 255};
|
||||
|
||||
fill->colorStops(colorStops, 3);
|
||||
shape->fill(move(fill));
|
||||
shape->fill(std::move(fill));
|
||||
shape->translate(385, 400);
|
||||
|
||||
//Update Shape1
|
||||
shape->scale(1 - 0.75 * progress);
|
||||
shape->rotate(360 * progress);
|
||||
|
||||
if (canvas->push(move(shape)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape)) != tvg::Result::Success) return;
|
||||
|
||||
//Shape2
|
||||
auto shape2 = tvg::Shape::gen();
|
||||
|
@ -74,12 +74,12 @@ void tvgUpdateCmds(tvg::Canvas* canvas, float progress)
|
|||
colorStops2[1] = {1, 255, 255, 255, 255};
|
||||
|
||||
fill2->colorStops(colorStops2, 2);
|
||||
shape2->fill(move(fill2));
|
||||
shape2->fill(std::move(fill2));
|
||||
|
||||
shape2->rotate(360 * progress);
|
||||
shape2->translate(400 + progress * 300, 400);
|
||||
|
||||
if (canvas->push(move(shape2)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape2)) != tvg::Result::Success) return;
|
||||
|
||||
//Shape3
|
||||
auto shape3 = tvg::Shape::gen();
|
||||
|
@ -100,14 +100,14 @@ void tvgUpdateCmds(tvg::Canvas* canvas, float progress)
|
|||
|
||||
fill3->colorStops(colorStops3, 4);
|
||||
|
||||
shape3->fill(move(fill3));
|
||||
shape3->fill(std::move(fill3));
|
||||
shape3->translate(400, 400);
|
||||
|
||||
//Update Shape3
|
||||
shape3->rotate(-360 * progress);
|
||||
shape3->scale(0.5 + progress);
|
||||
|
||||
if (canvas->push(move(shape3)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape3)) != tvg::Result::Success) return;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
return;
|
||||
}
|
||||
pPicture = picture.get();
|
||||
if (canvas->push(move(picture)) != tvg::Result::Success) {
|
||||
if (canvas->push(std::move(picture)) != tvg::Result::Success) {
|
||||
pPicture = nullptr;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
return;
|
||||
}
|
||||
pPicture = picture.get();
|
||||
if (canvas->push(move(picture)) != tvg::Result::Success) {
|
||||
if (canvas->push(std::move(picture)) != tvg::Result::Success) {
|
||||
pPicture = nullptr;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,9 +46,9 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
nMask->appendCircle(220, 220, 125, 125);
|
||||
nMask->fill(255, 255, 255, 255); //InvAlphaMask RGB channels are unused.
|
||||
|
||||
mask->composite(move(nMask), tvg::CompositeMethod::InvAlphaMask);
|
||||
shape->composite(move(mask), tvg::CompositeMethod::InvAlphaMask);
|
||||
canvas->push(move(shape));
|
||||
mask->composite(std::move(nMask), tvg::CompositeMethod::InvAlphaMask);
|
||||
shape->composite(std::move(mask), tvg::CompositeMethod::InvAlphaMask);
|
||||
canvas->push(std::move(shape));
|
||||
|
||||
//SVG
|
||||
auto svg = tvg::Picture::gen();
|
||||
|
@ -62,8 +62,8 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
mask2->appendCircle(150, 500, 75, 75);
|
||||
mask2->appendRect(150, 500, 200, 200, 30, 30);
|
||||
mask2->fill(255, 255, 255, 255); //InvAlphaMask RGB channels are unused.
|
||||
svg->composite(move(mask2), tvg::CompositeMethod::InvAlphaMask);
|
||||
if (canvas->push(move(svg)) != tvg::Result::Success) return;
|
||||
svg->composite(std::move(mask2), tvg::CompositeMethod::InvAlphaMask);
|
||||
if (canvas->push(std::move(svg)) != tvg::Result::Success) return;
|
||||
|
||||
//Star
|
||||
auto star = tvg::Shape::gen();
|
||||
|
@ -86,8 +86,8 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
auto mask3 = tvg::Shape::gen();
|
||||
mask3->appendCircle(600, 200, 125, 125);
|
||||
mask3->fill(255, 255, 255, 255); //InvAlphaMask RGB channels are unused.
|
||||
star->composite(move(mask3), tvg::CompositeMethod::InvAlphaMask);
|
||||
if (canvas->push(move(star)) != tvg::Result::Success) return;
|
||||
star->composite(std::move(mask3), tvg::CompositeMethod::InvAlphaMask);
|
||||
if (canvas->push(std::move(star)) != tvg::Result::Success) return;
|
||||
|
||||
//Image
|
||||
ifstream file(EXAMPLE_DIR"/rawimage_200x300.raw");
|
||||
|
@ -116,8 +116,8 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
mask4->lineTo(546, 493);
|
||||
mask4->close();
|
||||
mask4->fill(255, 255, 255, 70); //InvAlphaMask RGB channels are unused.
|
||||
image->composite(move(mask4), tvg::CompositeMethod::InvAlphaMask);
|
||||
if (canvas->push(move(image)) != tvg::Result::Success) return;
|
||||
image->composite(std::move(mask4), tvg::CompositeMethod::InvAlphaMask);
|
||||
if (canvas->push(std::move(image)) != tvg::Result::Success) return;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -47,8 +47,8 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
|
||||
fill->colorStops(colorStops, 2);
|
||||
|
||||
shape1->fill(move(fill));
|
||||
if (canvas->push(move(shape1)) != tvg::Result::Success) return;
|
||||
shape1->fill(std::move(fill));
|
||||
if (canvas->push(std::move(shape1)) != tvg::Result::Success) return;
|
||||
|
||||
//Prepare Circle
|
||||
auto shape2 = tvg::Shape::gen();
|
||||
|
@ -66,8 +66,8 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
|
||||
fill2->colorStops(colorStops2, 3);
|
||||
|
||||
shape2->fill(move(fill2));
|
||||
if (canvas->push(move(shape2)) != tvg::Result::Success) return;
|
||||
shape2->fill(std::move(fill2));
|
||||
if (canvas->push(std::move(shape2)) != tvg::Result::Success) return;
|
||||
|
||||
|
||||
//Prepare Ellipse
|
||||
|
@ -87,8 +87,8 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
|
||||
fill3->colorStops(colorStops3, 4);
|
||||
|
||||
shape3->fill(move(fill3));
|
||||
if (canvas->push(move(shape3)) != tvg::Result::Success) return;
|
||||
shape3->fill(std::move(fill3));
|
||||
if (canvas->push(std::move(shape3)) != tvg::Result::Success) return;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -46,9 +46,9 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
nMask->appendCircle(220, 220, 125, 125);
|
||||
nMask->fill(255, 200, 255, 255);
|
||||
|
||||
mask->composite(move(nMask), tvg::CompositeMethod::LumaMask);
|
||||
shape->composite(move(mask), tvg::CompositeMethod::LumaMask);
|
||||
canvas->push(move(shape));
|
||||
mask->composite(std::move(nMask), tvg::CompositeMethod::LumaMask);
|
||||
shape->composite(std::move(mask), tvg::CompositeMethod::LumaMask);
|
||||
canvas->push(std::move(shape));
|
||||
|
||||
//SVG
|
||||
auto svg = tvg::Picture::gen();
|
||||
|
@ -62,8 +62,8 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
mask2->appendCircle(150, 500, 75, 75);
|
||||
mask2->appendRect(150, 500, 200, 200, 30, 30);
|
||||
mask2->fill(255, 255, 255, 255);
|
||||
svg->composite(move(mask2), tvg::CompositeMethod::LumaMask);
|
||||
if (canvas->push(move(svg)) != tvg::Result::Success) return;
|
||||
svg->composite(std::move(mask2), tvg::CompositeMethod::LumaMask);
|
||||
if (canvas->push(std::move(svg)) != tvg::Result::Success) return;
|
||||
|
||||
//Star
|
||||
auto star = tvg::Shape::gen();
|
||||
|
@ -86,8 +86,8 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
auto mask3 = tvg::Shape::gen();
|
||||
mask3->appendCircle(600, 200, 125, 125);
|
||||
mask3->fill(0, 255, 255, 255);
|
||||
star->composite(move(mask3), tvg::CompositeMethod::LumaMask);
|
||||
if (canvas->push(move(star)) != tvg::Result::Success) return;
|
||||
star->composite(std::move(mask3), tvg::CompositeMethod::LumaMask);
|
||||
if (canvas->push(std::move(star)) != tvg::Result::Success) return;
|
||||
|
||||
//Image
|
||||
ifstream file(EXAMPLE_DIR"/rawimage_200x300.raw");
|
||||
|
@ -108,10 +108,10 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
auto mask4_circle = tvg::Shape::gen();
|
||||
mask4_circle->appendCircle(600, 550, 125, 125);
|
||||
mask4_circle->fill(128, 0, 128, 224);
|
||||
if (mask4->push(move(mask4_rect)) != tvg::Result::Success) return;
|
||||
if (mask4->push(move(mask4_circle)) != tvg::Result::Success) return;
|
||||
image->composite(move(mask4), tvg::CompositeMethod::LumaMask);
|
||||
if (canvas->push(move(image)) != tvg::Result::Success) return;
|
||||
if (mask4->push(std::move(mask4_rect)) != tvg::Result::Success) return;
|
||||
if (mask4->push(std::move(mask4_circle)) != tvg::Result::Success) return;
|
||||
image->composite(std::move(mask4), tvg::CompositeMethod::LumaMask);
|
||||
if (canvas->push(std::move(image)) != tvg::Result::Success) return;
|
||||
|
||||
free(data);
|
||||
}
|
||||
|
|
|
@ -46,9 +46,9 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
nMask->appendCircle(220, 220, 125, 125);
|
||||
nMask->fill(255, 255, 255, 255); //AlphaMask RGB channels are unused.
|
||||
|
||||
mask->composite(move(nMask), tvg::CompositeMethod::AlphaMask);
|
||||
shape->composite(move(mask), tvg::CompositeMethod::AlphaMask);
|
||||
canvas->push(move(shape));
|
||||
mask->composite(std::move(nMask), tvg::CompositeMethod::AlphaMask);
|
||||
shape->composite(std::move(mask), tvg::CompositeMethod::AlphaMask);
|
||||
canvas->push(std::move(shape));
|
||||
|
||||
//SVG
|
||||
auto svg = tvg::Picture::gen();
|
||||
|
@ -62,8 +62,8 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
mask2->appendCircle(150, 500, 75, 75);
|
||||
mask2->appendRect(150, 500, 200, 200, 30, 30);
|
||||
mask2->fill(255, 255, 255, 255); //AlphaMask RGB channels are unused.
|
||||
svg->composite(move(mask2), tvg::CompositeMethod::AlphaMask);
|
||||
if (canvas->push(move(svg)) != tvg::Result::Success) return;
|
||||
svg->composite(std::move(mask2), tvg::CompositeMethod::AlphaMask);
|
||||
if (canvas->push(std::move(svg)) != tvg::Result::Success) return;
|
||||
|
||||
//Star
|
||||
auto star = tvg::Shape::gen();
|
||||
|
@ -88,8 +88,8 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
mask3->appendCircle(600, 200, 125, 125);
|
||||
mask3->fill(255, 255, 255, 255); //AlphaMask RGB channels are unused.
|
||||
mask3->opacity(200);
|
||||
star->composite(move(mask3), tvg::CompositeMethod::AlphaMask);
|
||||
if (canvas->push(move(star)) != tvg::Result::Success) return;
|
||||
star->composite(std::move(mask3), tvg::CompositeMethod::AlphaMask);
|
||||
if (canvas->push(std::move(star)) != tvg::Result::Success) return;
|
||||
|
||||
//Image
|
||||
ifstream file(EXAMPLE_DIR"/rawimage_200x300.raw");
|
||||
|
@ -117,8 +117,8 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
mask4->close();
|
||||
mask4->fill(255, 255, 255, 255); //AlphaMask RGB channels are unused.
|
||||
mask4->opacity(70);
|
||||
image->composite(move(mask4), tvg::CompositeMethod::AlphaMask);
|
||||
if (canvas->push(move(image)) != tvg::Result::Success) return;
|
||||
image->composite(std::move(mask4), tvg::CompositeMethod::AlphaMask);
|
||||
if (canvas->push(std::move(image)) != tvg::Result::Success) return;
|
||||
|
||||
free(data);
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ void tvgDrawCmds(tvg::Canvas* canvas, const char* path, const char* name)
|
|||
picture->scale(scale);
|
||||
picture->translate(shiftX, shiftY);
|
||||
|
||||
if (canvas->push(move(picture)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(picture)) != tvg::Result::Success) return;
|
||||
|
||||
cout << "SVG: " << buf << endl;
|
||||
|
||||
|
@ -130,7 +130,7 @@ void tvgSwTest(const char* name, const char* path, void* data)
|
|||
|
||||
tvgDrawCmds(canvas.get(), path, name);
|
||||
|
||||
canvases.push_back(move(canvas));
|
||||
canvases.push_back(std::move(canvas));
|
||||
}
|
||||
|
||||
|
||||
|
@ -168,7 +168,7 @@ void initGLview(Evas_Object *obj)
|
|||
Canvas keeps this shape node unless user call canvas->clear() */
|
||||
tvgDrawCmds(canvas.get(), objData->path, objData->name);
|
||||
|
||||
canvases.push_back(move(canvas));
|
||||
canvases.push_back(std::move(canvas));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -36,19 +36,19 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
auto shape1 = tvg::Shape::gen();
|
||||
shape1->appendRect(0, 0, 400, 400, 50, 50); //x, y, w, h, rx, ry
|
||||
shape1->fill(0, 255, 0, 255); //r, g, b, a
|
||||
if (canvas->push(move(shape1)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape1)) != tvg::Result::Success) return;
|
||||
|
||||
//Prepare Circle
|
||||
auto shape2 = tvg::Shape::gen();
|
||||
shape2->appendCircle(400, 400, 200, 200); //cx, cy, radiusW, radiusH
|
||||
shape2->fill(255, 255, 0, 255); //r, g, b, a
|
||||
if (canvas->push(move(shape2)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape2)) != tvg::Result::Success) return;
|
||||
|
||||
//Prepare Ellipse
|
||||
auto shape3 = tvg::Shape::gen();
|
||||
shape3->appendCircle(600, 600, 150, 100); //cx, cy, radiusW, radiusH
|
||||
shape3->fill(0, 255, 255, 255); //r, g, b, a
|
||||
if (canvas->push(move(shape3)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape3)) != tvg::Result::Success) return;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
auto shape1 = tvg::Shape::gen();
|
||||
shape1->appendCircle(400, 400, 250, 250);
|
||||
shape1->fill(255, 255, 0, 255);
|
||||
scene->push(move(shape1));
|
||||
scene->push(std::move(shape1));
|
||||
|
||||
//Round rectangle
|
||||
auto shape2 = tvg::Shape::gen();
|
||||
|
@ -47,11 +47,11 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape2->fill(0, 255, 0, 255);
|
||||
shape2->stroke(10);
|
||||
shape2->stroke(255, 255, 255, 255);
|
||||
scene->push(move(shape2));
|
||||
scene->push(std::move(shape2));
|
||||
|
||||
|
||||
//Draw the Scene onto the Canvas
|
||||
canvas->push(move(scene));
|
||||
canvas->push(std::move(scene));
|
||||
|
||||
//Create a Scene 2
|
||||
auto scene2 = tvg::Scene::gen();
|
||||
|
@ -79,7 +79,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape3->stroke(255, 255, 255, 255);
|
||||
shape3->opacity(127);
|
||||
|
||||
scene2->push(move(shape3));
|
||||
scene2->push(std::move(shape3));
|
||||
|
||||
//Circle
|
||||
auto shape4 = tvg::Shape::gen();
|
||||
|
@ -101,10 +101,10 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape4->stroke(0, 0, 255, 255);
|
||||
shape4->opacity(200);
|
||||
shape4->scale(3);
|
||||
scene2->push(move(shape4));
|
||||
scene2->push(std::move(shape4));
|
||||
|
||||
//Draw the Scene onto the Canvas
|
||||
canvas->push(move(scene2));
|
||||
canvas->push(std::move(scene2));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape1->lineTo(146, 143);
|
||||
shape1->close();
|
||||
shape1->fill(0, 0, 255, 255);
|
||||
if (canvas->push(move(shape1)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape1)) != tvg::Result::Success) return;
|
||||
|
||||
|
||||
//Circle
|
||||
|
@ -65,7 +65,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape2->cubicTo(cx - radius, cy - halfRadius, cx - halfRadius, cy - radius, cx, cy - radius);
|
||||
shape2->close();
|
||||
shape2->fill(255, 0, 0, 255);
|
||||
if (canvas->push(move(shape2)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape2)) != tvg::Result::Success) return;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
auto shape1 = tvg::Shape::gen();
|
||||
shape1->appendPath(cmds, 11, pts, 10); //copy path data
|
||||
shape1->fill(0, 255, 0, 255);
|
||||
if (canvas->push(move(shape1)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape1)) != tvg::Result::Success) return;
|
||||
|
||||
/* Circle */
|
||||
auto cx = 550.0f;
|
||||
|
@ -102,7 +102,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
auto shape2 = tvg::Shape::gen();
|
||||
shape2->appendPath(cmds2, 6, pts2, 13); //copy path data
|
||||
shape2->fill(255, 255, 0, 255);
|
||||
if (canvas->push(move(shape2)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape2)) != tvg::Result::Success) return;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -44,9 +44,9 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
auto picture = tvg::Picture::gen();
|
||||
picture->load(EXAMPLE_DIR"/tiger.svg");
|
||||
picture->size(WIDTH, HEIGHT);
|
||||
picture->composite(move(mask), tvg::CompositeMethod::AlphaMask);
|
||||
picture->composite(std::move(mask), tvg::CompositeMethod::AlphaMask);
|
||||
pPicture = picture.get();
|
||||
canvas->push(move(picture));
|
||||
canvas->push(std::move(picture));
|
||||
}
|
||||
|
||||
void tvgUpdateCmds(tvg::Canvas* canvas, float progress)
|
||||
|
|
|
@ -44,7 +44,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
picture->rotate(30 * i);
|
||||
picture->size(200, 200);
|
||||
picture->opacity(opacity + opacity * i);
|
||||
if (canvas->push(move(picture)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(picture)) != tvg::Result::Success) return;
|
||||
}
|
||||
|
||||
//Open file manually
|
||||
|
@ -68,7 +68,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
free(data);
|
||||
picture->translate(400, 0);
|
||||
picture->scale(0.8);
|
||||
canvas->push(move(picture));
|
||||
canvas->push(std::move(picture));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
auto bg = tvg::Shape::gen();
|
||||
bg->appendRect(0, 0, WIDTH, HEIGHT, 0, 0); //x, y, w, h, rx, ry
|
||||
bg->fill(255, 255, 255, 255); //r, g, b, a
|
||||
canvas->push(move(bg));
|
||||
canvas->push(std::move(bg));
|
||||
|
||||
//Load png file from path
|
||||
auto opacity = 31;
|
||||
|
@ -50,7 +50,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
picture->rotate(30 * i);
|
||||
picture->size(200, 200);
|
||||
picture->opacity(opacity + opacity * i);
|
||||
if (canvas->push(move(picture)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(picture)) != tvg::Result::Success) return;
|
||||
}
|
||||
|
||||
//Open file manually
|
||||
|
@ -74,7 +74,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
free(data);
|
||||
picture->translate(400, 0);
|
||||
picture->scale(0.8);
|
||||
canvas->push(move(picture));
|
||||
canvas->push(std::move(picture));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape->appendRect(0, 0, WIDTH, HEIGHT, 0, 0);
|
||||
shape->fill(255, 255, 255, 255);
|
||||
|
||||
if (canvas->push(move(shape)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape)) != tvg::Result::Success) return;
|
||||
|
||||
string path(EXAMPLE_DIR"/rawimage_200x300.raw");
|
||||
|
||||
|
@ -49,7 +49,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
auto picture = tvg::Picture::gen();
|
||||
if (picture->load(data, 200, 300, true) != tvg::Result::Success) return;
|
||||
picture->translate(400, 250);
|
||||
canvas->push(move(picture));
|
||||
canvas->push(std::move(picture));
|
||||
|
||||
auto picture2 = tvg::Picture::gen();
|
||||
if (picture2->load(data, 200, 300, true) != tvg::Result::Success) return;
|
||||
|
@ -62,9 +62,9 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
auto circle = tvg::Shape::gen();
|
||||
circle->appendCircle(350, 350, 200,200);
|
||||
|
||||
picture2->composite(move(circle), tvg::CompositeMethod::ClipPath);
|
||||
picture2->composite(std::move(circle), tvg::CompositeMethod::ClipPath);
|
||||
|
||||
canvas->push(move(picture2));
|
||||
canvas->push(std::move(picture2));
|
||||
|
||||
free(data);
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
picture->translate(w * 0.1f, h * 0.1f);
|
||||
picture->size(w * 0.8f, h * 0.8f);
|
||||
|
||||
canvas->push(move(picture));
|
||||
canvas->push(std::move(picture));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -47,8 +47,8 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
|
||||
fill->colorStops(colorStops, 2);
|
||||
|
||||
shape1->fill(move(fill));
|
||||
if (canvas->push(move(shape1)) != tvg::Result::Success) return;
|
||||
shape1->fill(std::move(fill));
|
||||
if (canvas->push(std::move(shape1)) != tvg::Result::Success) return;
|
||||
|
||||
//Prepare Circle
|
||||
auto shape2 = tvg::Shape::gen();
|
||||
|
@ -66,8 +66,8 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
|
||||
fill2->colorStops(colorStops2, 3);
|
||||
|
||||
shape2->fill(move(fill2));
|
||||
if (canvas->push(move(shape2)) != tvg::Result::Success) return;
|
||||
shape2->fill(std::move(fill2));
|
||||
if (canvas->push(std::move(shape2)) != tvg::Result::Success) return;
|
||||
|
||||
|
||||
//Prepare Ellipse
|
||||
|
@ -87,8 +87,8 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
|
||||
fill3->colorStops(colorStops3, 4);
|
||||
|
||||
shape3->fill(move(fill3));
|
||||
if (canvas->push(move(shape3)) != tvg::Result::Success) return;
|
||||
shape3->fill(std::move(fill3));
|
||||
if (canvas->push(std::move(shape3)) != tvg::Result::Success) return;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -38,19 +38,19 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
auto shape1 = tvg::Shape::gen();
|
||||
shape1->appendRect(0, 0, 400, 400, 50, 50); //x, y, w, h, rx, ry
|
||||
shape1->fill(0, 255, 0, 255); //r, g, b, a
|
||||
scene->push(move(shape1));
|
||||
scene->push(std::move(shape1));
|
||||
|
||||
//Prepare Circle
|
||||
auto shape2 = tvg::Shape::gen();
|
||||
shape2->appendCircle(400, 400, 200, 200); //cx, cy, radiusW, radiusH
|
||||
shape2->fill(255, 255, 0, 255); //r, g, b, a
|
||||
scene->push(move(shape2));
|
||||
scene->push(std::move(shape2));
|
||||
|
||||
//Prepare Ellipse
|
||||
auto shape3 = tvg::Shape::gen();
|
||||
shape3->appendCircle(600, 600, 150, 100); //cx, cy, radiusW, radiusH
|
||||
shape3->fill(0, 255, 255, 255); //r, g, b, a
|
||||
scene->push(move(shape3));
|
||||
scene->push(std::move(shape3));
|
||||
|
||||
//Create another Scene
|
||||
auto scene2 = tvg::Scene::gen();
|
||||
|
@ -72,7 +72,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape4->lineTo(146, 143);
|
||||
shape4->close();
|
||||
shape4->fill(0, 0, 255, 255);
|
||||
scene2->push(move(shape4));
|
||||
scene2->push(std::move(shape4));
|
||||
|
||||
//Circle
|
||||
auto shape5 = tvg::Shape::gen();
|
||||
|
@ -89,13 +89,13 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape5->cubicTo(cx - halfRadius, cy + radius, cx - radius, cy + halfRadius, cx - radius, cy);
|
||||
shape5->cubicTo(cx - radius, cy - halfRadius, cx - halfRadius, cy - radius, cx, cy - radius);
|
||||
shape5->fill(255, 0, 0, 255);
|
||||
scene2->push(move(shape5));
|
||||
scene2->push(std::move(shape5));
|
||||
|
||||
//Push scene2 onto the scene
|
||||
scene->push(move(scene2));
|
||||
scene->push(std::move(scene2));
|
||||
|
||||
//Draw the Scene onto the Canvas
|
||||
canvas->push(move(scene));
|
||||
canvas->push(std::move(scene));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -38,23 +38,23 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
|
||||
auto shape1 = tvg::Shape::gen();
|
||||
shape1->appendCircle(200, 200, 100, 100);
|
||||
clipper->push(move(shape1));
|
||||
clipper->push(std::move(shape1));
|
||||
|
||||
auto shape2 = tvg::Shape::gen();
|
||||
shape2->appendCircle(400, 400, 150, 150);
|
||||
clipper->push(move(shape2));
|
||||
clipper->push(std::move(shape2));
|
||||
|
||||
auto shape3 = tvg::Shape::gen();
|
||||
shape3->appendCircle(150, 300, 60, 60);
|
||||
clipper->push(move(shape3));
|
||||
clipper->push(std::move(shape3));
|
||||
|
||||
auto shape4 = tvg::Shape::gen();
|
||||
shape4->appendCircle(400, 100, 125, 125);
|
||||
clipper->push(move(shape4));
|
||||
clipper->push(std::move(shape4));
|
||||
|
||||
auto shape5 = tvg::Shape::gen();
|
||||
shape5->appendCircle(150, 500, 100, 100);
|
||||
clipper->push(move(shape5));
|
||||
clipper->push(std::move(shape5));
|
||||
#else
|
||||
//A single clipper with multiple regions
|
||||
auto clipper = tvg::Shape::gen();
|
||||
|
@ -71,8 +71,8 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape->stroke(0, 0, 255, 255);
|
||||
shape->stroke(10);
|
||||
shape->fill(255, 255, 255, 255);
|
||||
shape->composite(move(clipper), tvg::CompositeMethod::ClipPath);
|
||||
if (canvas->push(move(shape)) != tvg::Result::Success) return;
|
||||
shape->composite(std::move(clipper), tvg::CompositeMethod::ClipPath);
|
||||
if (canvas->push(std::move(shape)) != tvg::Result::Success) return;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
|
|
|
@ -42,19 +42,19 @@ void tvgUpdateCmds(tvg::Canvas* canvas, float progress)
|
|||
shape1->fill(0, 255, 0, 255); //r, g, b, a
|
||||
shape1->stroke(5); //width
|
||||
shape1->stroke(255, 255, 255, 255); //r, g, b, a
|
||||
scene->push(move(shape1));
|
||||
scene->push(std::move(shape1));
|
||||
|
||||
//Prepare Circle (Scene1)
|
||||
auto shape2 = tvg::Shape::gen();
|
||||
shape2->appendCircle(-165, -150, 200, 200); //cx, cy, radiusW, radiusH
|
||||
shape2->fill(255, 255, 0, 255); //r, g, b, a
|
||||
scene->push(move(shape2));
|
||||
scene->push(std::move(shape2));
|
||||
|
||||
//Prepare Ellipse (Scene1)
|
||||
auto shape3 = tvg::Shape::gen();
|
||||
shape3->appendCircle(265, 250, 150, 100); //cx, cy, radiusW, radiusH
|
||||
shape3->fill(0, 255, 255, 255); //r, g, b, a
|
||||
scene->push(move(shape3));
|
||||
scene->push(std::move(shape3));
|
||||
|
||||
scene->translate(350, 350);
|
||||
scene->scale(0.5);
|
||||
|
@ -82,7 +82,7 @@ void tvgUpdateCmds(tvg::Canvas* canvas, float progress)
|
|||
shape4->fill(0, 0, 255, 127);
|
||||
shape4->stroke(3); //width
|
||||
shape4->stroke(0, 0, 255, 255); //r, g, b, a
|
||||
scene2->push(move(shape4));
|
||||
scene2->push(std::move(shape4));
|
||||
|
||||
//Circle (Scene2)
|
||||
auto shape5 = tvg::Shape::gen();
|
||||
|
@ -100,16 +100,16 @@ void tvgUpdateCmds(tvg::Canvas* canvas, float progress)
|
|||
shape5->cubicTo(cx - radius, cy - halfRadius, cx - halfRadius, cy - radius, cx, cy - radius);
|
||||
shape5->close();
|
||||
shape5->fill(255, 0, 0, 127);
|
||||
scene2->push(move(shape5));
|
||||
scene2->push(std::move(shape5));
|
||||
|
||||
scene2->translate(500, 350);
|
||||
scene2->rotate(360 * progress);
|
||||
|
||||
//Push scene2 onto the scene
|
||||
scene->push(move(scene2));
|
||||
scene->push(std::move(scene2));
|
||||
|
||||
//Draw the Scene onto the Canvas
|
||||
canvas->push(move(scene));
|
||||
canvas->push(std::move(scene));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape1->appendCircle(400, 500, 170, 100); //cx, cy, radiusW, radiusH
|
||||
shape1->fill(255, 255, 0, 255); //r, g, b, a
|
||||
|
||||
canvas->push(move(shape1));
|
||||
canvas->push(std::move(shape1));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -40,21 +40,21 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
paints[0] = shape1.get();
|
||||
shape1->appendRect(0, 0, 400, 400, 50, 50); //x, y, w, h, rx, ry
|
||||
shape1->fill(0, 255, 0, 255); //r, g, b, a
|
||||
if (canvas->push(move(shape1)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape1)) != tvg::Result::Success) return;
|
||||
|
||||
//Prepare Round Rectangle2
|
||||
auto shape2 = tvg::Shape::gen();
|
||||
paints[1] = shape2.get();
|
||||
shape2->appendRect(100, 100, 400, 400, 50, 50); //x, y, w, h, rx, ry
|
||||
shape2->fill(255, 255, 0, 255); //r, g, b, a
|
||||
if (canvas->push(move(shape2)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape2)) != tvg::Result::Success) return;
|
||||
|
||||
//Prepare Round Rectangle3
|
||||
auto shape3 = tvg::Shape::gen();
|
||||
paints[2] = shape3.get();
|
||||
shape3->appendRect(200, 200, 400, 400, 50, 50); //x, y, w, h, rx, ry
|
||||
shape3->fill(0, 255, 255, 255); //r, g, b, a
|
||||
if (canvas->push(move(shape3)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape3)) != tvg::Result::Success) return;
|
||||
|
||||
//Prepare Scene
|
||||
auto scene = tvg::Scene::gen();
|
||||
|
@ -65,16 +65,16 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape4->fill(255, 0, 0, 255);
|
||||
shape4->stroke(5);
|
||||
shape4->stroke(255, 255, 255, 255);
|
||||
scene->push(move(shape4));
|
||||
scene->push(std::move(shape4));
|
||||
|
||||
auto shape5 = tvg::Shape::gen();
|
||||
shape5->appendCircle(550, 550, 150, 150);
|
||||
shape5->fill(255, 0, 255, 255);
|
||||
shape5->stroke(5);
|
||||
shape5->stroke(255, 255, 255, 255);
|
||||
scene->push(move(shape5));
|
||||
scene->push(std::move(shape5));
|
||||
|
||||
if (canvas->push(move(scene)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(scene)) != tvg::Result::Success) return;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape->appendRect(0, 0, WIDTH, HEIGHT, 0, 0); //x, y, w, h, rx, ry
|
||||
shape->fill(255, 255, 255, 255); //r, g, b, a
|
||||
|
||||
if (canvas->push(move(shape)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape)) != tvg::Result::Success) return;
|
||||
|
||||
eina_file_dir_list(EXAMPLE_DIR, EINA_TRUE, svgDirCallback, canvas);
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape1->stroke(tvg::StrokeJoin::Bevel); //default is Bevel
|
||||
shape1->stroke(10); //width: 10px
|
||||
|
||||
if (canvas->push(move(shape1)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape1)) != tvg::Result::Success) return;
|
||||
|
||||
//Shape 2
|
||||
auto shape2 = tvg::Shape::gen();
|
||||
|
@ -48,7 +48,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape2->stroke(tvg::StrokeJoin::Round);
|
||||
shape2->stroke(10);
|
||||
|
||||
if (canvas->push(move(shape2)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape2)) != tvg::Result::Success) return;
|
||||
|
||||
//Shape 3
|
||||
auto shape3 = tvg::Shape::gen();
|
||||
|
@ -58,7 +58,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape3->stroke(tvg::StrokeJoin::Miter);
|
||||
shape3->stroke(10);
|
||||
|
||||
if (canvas->push(move(shape3)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape3)) != tvg::Result::Success) return;
|
||||
|
||||
//Shape 4
|
||||
auto shape4 = tvg::Shape::gen();
|
||||
|
@ -67,7 +67,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape4->stroke(255, 255, 255, 255);
|
||||
shape4->stroke(1);
|
||||
|
||||
if (canvas->push(move(shape4)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape4)) != tvg::Result::Success) return;
|
||||
|
||||
//Shape 5
|
||||
auto shape5 = tvg::Shape::gen();
|
||||
|
@ -76,7 +76,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape5->stroke(255, 255, 255, 255);
|
||||
shape5->stroke(2);
|
||||
|
||||
if (canvas->push(move(shape5)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape5)) != tvg::Result::Success) return;
|
||||
|
||||
//Shape 6
|
||||
auto shape6 = tvg::Shape::gen();
|
||||
|
@ -85,7 +85,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape6->stroke(255, 255, 255, 255);
|
||||
shape6->stroke(4);
|
||||
|
||||
if (canvas->push(move(shape6)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape6)) != tvg::Result::Success) return;
|
||||
|
||||
//Stroke width test
|
||||
for (int i = 0; i < 10; ++i) {
|
||||
|
@ -95,7 +95,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
hline->stroke(255, 255, 255, 255); //color: r, g, b, a
|
||||
hline->stroke(i + 1); //stroke width
|
||||
hline->stroke(tvg::StrokeCap::Round); //default is Square
|
||||
if (canvas->push(move(hline)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(hline)) != tvg::Result::Success) return;
|
||||
|
||||
auto vline = tvg::Shape::gen();
|
||||
vline->moveTo(500 + (25 * i), 550);
|
||||
|
@ -103,7 +103,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
vline->stroke(255, 255, 255, 255); //color: r, g, b, a
|
||||
vline->stroke(i + 1); //stroke width
|
||||
vline->stroke(tvg::StrokeCap::Round); //default is Square
|
||||
if (canvas->push(move(vline)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(vline)) != tvg::Result::Success) return;
|
||||
}
|
||||
|
||||
//Stroke cap test
|
||||
|
@ -116,15 +116,15 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
|
||||
auto line2 = tvg::cast<tvg::Shape>(line1->duplicate());
|
||||
auto line3 = tvg::cast<tvg::Shape>(line1->duplicate());
|
||||
if (canvas->push(move(line1)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(line1)) != tvg::Result::Success) return;
|
||||
|
||||
line2->stroke(tvg::StrokeCap::Square);
|
||||
line2->translate(0, 50);
|
||||
if (canvas->push(move(line2)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(line2)) != tvg::Result::Success) return;
|
||||
|
||||
line3->stroke(tvg::StrokeCap::Butt);
|
||||
line3->translate(0, 100);
|
||||
if (canvas->push(move(line3)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(line3)) != tvg::Result::Success) return;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape1->stroke(10);
|
||||
shape1->stroke(tvg::StrokeJoin::Round);
|
||||
shape1->stroke(tvg::StrokeCap::Round);
|
||||
if (canvas->push(move(shape1)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape1)) != tvg::Result::Success) return;
|
||||
|
||||
auto shape2 = tvg::Shape::gen();
|
||||
shape2->moveTo(270, 50);
|
||||
|
@ -53,7 +53,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape2->stroke(10);
|
||||
shape2->stroke(tvg::StrokeJoin::Bevel);
|
||||
shape2->stroke(tvg::StrokeCap::Square);
|
||||
if (canvas->push(move(shape2)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape2)) != tvg::Result::Success) return;
|
||||
|
||||
auto shape3 = tvg::Shape::gen();
|
||||
shape3->moveTo(520, 50);
|
||||
|
@ -65,7 +65,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape3->stroke(10);
|
||||
shape3->stroke(tvg::StrokeJoin::Miter);
|
||||
shape3->stroke(tvg::StrokeCap::Butt);
|
||||
if (canvas->push(move(shape3)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape3)) != tvg::Result::Success) return;
|
||||
|
||||
//Test for Stroke Dash
|
||||
auto shape4 = tvg::Shape::gen();
|
||||
|
@ -81,7 +81,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
|
||||
float dashPattern1[2] = {20, 10};
|
||||
shape4->stroke(dashPattern1, 2);
|
||||
if (canvas->push(move(shape4)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape4)) != tvg::Result::Success) return;
|
||||
|
||||
auto shape5 = tvg::Shape::gen();
|
||||
shape5->moveTo(270, 230);
|
||||
|
@ -96,7 +96,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
|
||||
float dashPattern2[2] = {10, 10};
|
||||
shape5->stroke(dashPattern2, 2);
|
||||
if (canvas->push(move(shape5)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape5)) != tvg::Result::Success) return;
|
||||
|
||||
auto shape6 = tvg::Shape::gen();
|
||||
shape6->moveTo(520, 230);
|
||||
|
@ -111,7 +111,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
|
||||
float dashPattern3[6] = {10, 10, 1, 8, 1, 10};
|
||||
shape6->stroke(dashPattern3, 6);
|
||||
if (canvas->push(move(shape6)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape6)) != tvg::Result::Success) return;
|
||||
|
||||
//For a comparison with shapes 10-12
|
||||
auto shape7 = tvg::Shape::gen();
|
||||
|
@ -120,7 +120,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape7->stroke(7);
|
||||
shape7->stroke(tvg::StrokeJoin::Round);
|
||||
shape7->stroke(tvg::StrokeCap::Round);
|
||||
if (canvas->push(move(shape7)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape7)) != tvg::Result::Success) return;
|
||||
|
||||
auto shape8 = tvg::Shape::gen();
|
||||
shape8->appendArc(320, 400, 160, 10, 70, false);
|
||||
|
@ -128,7 +128,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape8->stroke(7);
|
||||
shape8->stroke(tvg::StrokeJoin::Bevel);
|
||||
shape8->stroke(tvg::StrokeCap::Square);
|
||||
if (canvas->push(move(shape8)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape8)) != tvg::Result::Success) return;
|
||||
|
||||
auto shape9 = tvg::Shape::gen();
|
||||
shape9->appendArc(570, 400, 160, 10, 70, true);
|
||||
|
@ -136,7 +136,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape9->stroke(7);
|
||||
shape9->stroke(tvg::StrokeJoin::Miter);
|
||||
shape9->stroke(tvg::StrokeCap::Butt);
|
||||
if (canvas->push(move(shape9)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape9)) != tvg::Result::Success) return;
|
||||
|
||||
//Test for Stroke Dash for Arc, Circle, Rect
|
||||
auto shape10 = tvg::Shape::gen();
|
||||
|
@ -148,7 +148,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape10->stroke(tvg::StrokeJoin::Round);
|
||||
shape10->stroke(tvg::StrokeCap::Round);
|
||||
shape10->stroke(dashPattern1, 2);
|
||||
if (canvas->push(move(shape10)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape10)) != tvg::Result::Success) return;
|
||||
|
||||
auto shape11 = tvg::Shape::gen();
|
||||
shape11->appendArc(320, 600, 160, 10, 30, false);
|
||||
|
@ -159,7 +159,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape11->stroke(tvg::StrokeJoin::Bevel);
|
||||
shape11->stroke(tvg::StrokeCap::Square);
|
||||
shape11->stroke(dashPattern2, 2);
|
||||
if (canvas->push(move(shape11)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape11)) != tvg::Result::Success) return;
|
||||
|
||||
auto shape12 = tvg::Shape::gen();
|
||||
shape12->appendArc(570, 600, 160, 10, 30, true);
|
||||
|
@ -170,7 +170,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape12->stroke(tvg::StrokeJoin::Miter);
|
||||
shape12->stroke(tvg::StrokeCap::Butt);
|
||||
shape12->stroke(dashPattern3, 6);
|
||||
if (canvas->push(move(shape12)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape12)) != tvg::Result::Success) return;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ void svgDirCallback(const char* name, const char* path, void* data)
|
|||
picture->scale(scale);
|
||||
picture->translate((counter % NUM_PER_ROW) * SIZE + shiftX, (counter / NUM_PER_ROW) * (HEIGHT / NUM_PER_COL) + shiftY);
|
||||
|
||||
pictures.push_back(move(picture));
|
||||
pictures.push_back(std::move(picture));
|
||||
|
||||
cout << "SVG: " << buf << endl;
|
||||
|
||||
|
@ -81,7 +81,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape->appendRect(0, 0, WIDTH, HEIGHT, 0, 0); //x, y, w, h, rx, ry
|
||||
shape->fill(255, 255, 255, 255); //r, g, b, a
|
||||
|
||||
if (canvas->push(move(shape)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape)) != tvg::Result::Success) return;
|
||||
|
||||
eina_file_dir_list(EXAMPLE_DIR, EINA_TRUE, svgDirCallback, canvas);
|
||||
|
||||
|
@ -90,7 +90,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
This means it earns the time to finish loading svg resources,
|
||||
otherwise you can push pictures immediately. */
|
||||
for (auto& paint : pictures) {
|
||||
canvas->push(move(paint));
|
||||
canvas->push(std::move(paint));
|
||||
}
|
||||
|
||||
pictures.clear();
|
||||
|
|
|
@ -38,14 +38,14 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape->appendRect(0, 0, WIDTH, HEIGHT, 0, 0); //x, y, w, h, rx, ry
|
||||
shape->fill(255, 255, 255, 255); //r, g, b, a
|
||||
|
||||
if (canvas->push(move(shape)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape)) != tvg::Result::Success) return;
|
||||
|
||||
auto picture = tvg::Picture::gen();
|
||||
if (picture->load(svg, strlen(svg), "svg", false) != tvg::Result::Success) return;
|
||||
|
||||
picture->size(WIDTH, HEIGHT);
|
||||
|
||||
canvas->push(move(picture));
|
||||
canvas->push(std::move(picture));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape->appendRect(0, 0, WIDTH, HEIGHT, 0, 0);
|
||||
shape->fill(255, 255, 255, 255);
|
||||
|
||||
if (canvas->push(move(shape)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape)) != tvg::Result::Success) return;
|
||||
|
||||
//Raw Image
|
||||
string path(EXAMPLE_DIR"/rawimage_200x300.raw");
|
||||
|
@ -73,7 +73,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
|
||||
picture->translate(100, 100);
|
||||
|
||||
canvas->push(move(picture));
|
||||
canvas->push(std::move(picture));
|
||||
|
||||
free(data);
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ void tvgUpdateCmds(tvg::Canvas* canvas, float progress)
|
|||
shape->scale(1 - 0.75 * progress);
|
||||
shape->rotate(360 * progress);
|
||||
|
||||
if (canvas->push(move(shape)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape)) != tvg::Result::Success) return;
|
||||
|
||||
//Shape2
|
||||
auto shape2 = tvg::Shape::gen();
|
||||
|
@ -52,7 +52,7 @@ void tvgUpdateCmds(tvg::Canvas* canvas, float progress)
|
|||
shape2->translate(400, 400);
|
||||
shape2->rotate(360 * progress);
|
||||
shape2->translate(400 + progress * 300, 400);
|
||||
if (canvas->push(move(shape2)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape2)) != tvg::Result::Success) return;
|
||||
|
||||
//Shape3
|
||||
auto shape3 = tvg::Shape::gen();
|
||||
|
@ -64,7 +64,7 @@ void tvgUpdateCmds(tvg::Canvas* canvas, float progress)
|
|||
shape3->translate(400, 400);
|
||||
shape3->rotate(-360 * progress);
|
||||
shape3->scale(0.5 + progress);
|
||||
if (canvas->push(move(shape3)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape3)) != tvg::Result::Success) return;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ void tvgDirCallback(const char* name, const char* path, void* data)
|
|||
picture->size(SIZE, SIZE);
|
||||
picture->translate((counter % NUM_PER_ROW) * SIZE, (counter / NUM_PER_ROW) * (HEIGHT / NUM_PER_COL));
|
||||
|
||||
pictures.push_back(move(picture));
|
||||
pictures.push_back(std::move(picture));
|
||||
|
||||
cout << "TVG: " << buf << endl;
|
||||
|
||||
|
@ -67,7 +67,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
shape->appendRect(0, 0, WIDTH, HEIGHT, 0, 0); //x, y, w, h, rx, ry
|
||||
shape->fill(255, 255, 255, 255); //r, g, b, a
|
||||
|
||||
if (canvas->push(move(shape)) != tvg::Result::Success) return;
|
||||
if (canvas->push(std::move(shape)) != tvg::Result::Success) return;
|
||||
|
||||
eina_file_dir_list(EXAMPLE_DIR, EINA_TRUE, tvgDirCallback, canvas);
|
||||
|
||||
|
@ -76,7 +76,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
This means it earns the time to finish loading tvg resources,
|
||||
otherwise you can push pictures immediately. */
|
||||
for (auto& paint : pictures) {
|
||||
canvas->push(move(paint));
|
||||
canvas->push(std::move(paint));
|
||||
}
|
||||
|
||||
pictures.clear();
|
||||
|
|
|
@ -87,7 +87,7 @@ unique_ptr<tvg::Paint> tvgClippedImage(uint32_t * data, int width, int heigth)
|
|||
imageClip->appendCircle(400, 200, 80, 180);
|
||||
imageClip->fill(0, 0, 0, 155);
|
||||
imageClip->translate(200, 0);
|
||||
image->composite(move(imageClip), tvg::CompositeMethod::ClipPath);
|
||||
image->composite(std::move(imageClip), tvg::CompositeMethod::ClipPath);
|
||||
|
||||
return image;
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ unique_ptr<tvg::Paint> tvgMaskedSvg()
|
|||
svgMask->translate(30, 440);
|
||||
svgMask->opacity(200);
|
||||
svgMask->scale(0.7);
|
||||
svg->composite(move(svgMask), tvg::CompositeMethod::AlphaMask);
|
||||
svg->composite(std::move(svgMask), tvg::CompositeMethod::AlphaMask);
|
||||
|
||||
return svg;
|
||||
}
|
||||
|
@ -124,20 +124,20 @@ unique_ptr<tvg::Paint> tvgNestedPaints(tvg::Fill::ColorStop* colorStops, int col
|
|||
auto shape = tvg::Shape::gen();
|
||||
shape->appendRect(50, 0, 50, 100, 10, 40);
|
||||
shape->fill(0, 0, 255, 125);
|
||||
scene2->push(move(shape));
|
||||
scene2->push(std::move(shape));
|
||||
|
||||
scene->push(move(scene2));
|
||||
scene->push(std::move(scene2));
|
||||
|
||||
auto shape2 = tvg::Shape::gen();
|
||||
shape2->appendRect(0, 0, 50, 100, 10, 40);
|
||||
auto fillShape = tvg::RadialGradient::gen();
|
||||
fillShape->radial(25, 50, 25);
|
||||
fillShape->colorStops(colorStops, colorStopsCnt);
|
||||
shape2->fill(move(fillShape));
|
||||
shape2->fill(std::move(fillShape));
|
||||
shape2->scale(2);
|
||||
shape2->opacity(200);
|
||||
shape2->translate(400, 400);
|
||||
scene->push(move(shape2));
|
||||
scene->push(std::move(shape2));
|
||||
|
||||
return scene;
|
||||
}
|
||||
|
@ -157,10 +157,10 @@ unique_ptr<tvg::Paint> tvgGradientShape(tvg::Fill::ColorStop* colorStops, int co
|
|||
|
||||
auto shape = tvg::Shape::gen();
|
||||
shape->appendCircle(200, 200, 180, 80);
|
||||
shape->fill(move(fillShape));
|
||||
shape->fill(std::move(fillShape));
|
||||
shape->stroke(20);
|
||||
shape->stroke(dashPattern, 2);
|
||||
shape->stroke(move(fillStroke));
|
||||
shape->stroke(std::move(fillStroke));
|
||||
|
||||
return shape;
|
||||
}
|
||||
|
@ -172,7 +172,7 @@ unique_ptr<tvg::Paint> tvgCircle1(tvg::Fill::ColorStop* colorStops, int colorSto
|
|||
auto fill = tvg::RadialGradient::gen();
|
||||
fill->radial(400, 375, 50);
|
||||
fill->colorStops(colorStops, colorStopsCnt);
|
||||
circ->fill(move(fill));
|
||||
circ->fill(std::move(fill));
|
||||
circ->fill(0, 255, 0, 155);
|
||||
|
||||
return circ;
|
||||
|
@ -186,7 +186,7 @@ unique_ptr<tvg::Paint> tvgCircle2(tvg::Fill::ColorStop* colorStops, int colorSto
|
|||
auto fill = tvg::RadialGradient::gen();
|
||||
fill->radial(400, 425, 50);
|
||||
fill->colorStops(colorStops, colorStopsCnt);
|
||||
circ->fill(move(fill));
|
||||
circ->fill(std::move(fill));
|
||||
|
||||
return circ;
|
||||
}
|
||||
|
@ -208,11 +208,11 @@ void exportTvg()
|
|||
|
||||
//texmap image
|
||||
auto texmap = tvgTexmap(data, width, height);
|
||||
if (scene->push(move(texmap)) != tvg::Result::Success) return;
|
||||
if (scene->push(std::move(texmap)) != tvg::Result::Success) return;
|
||||
|
||||
//clipped image
|
||||
auto image = tvgClippedImage(data, width, height);
|
||||
if (scene->push(move(image)) != tvg::Result::Success) return;
|
||||
if (scene->push(std::move(image)) != tvg::Result::Success) return;
|
||||
|
||||
free(data);
|
||||
|
||||
|
@ -232,32 +232,32 @@ void exportTvg()
|
|||
|
||||
//gradient shape + dashed stroke
|
||||
auto shape1 = tvgGradientShape(colorStops1, 3);
|
||||
if (scene->push(move(shape1)) != tvg::Result::Success) return;
|
||||
if (scene->push(std::move(shape1)) != tvg::Result::Success) return;
|
||||
|
||||
//nested paints
|
||||
auto scene2 = tvgNestedPaints(colorStops2, 2);
|
||||
if (scene->push(move(scene2)) != tvg::Result::Success) return;
|
||||
if (scene->push(std::move(scene2)) != tvg::Result::Success) return;
|
||||
|
||||
//masked svg file
|
||||
auto svg = tvgMaskedSvg();
|
||||
if (scene->push(move(svg)) != tvg::Result::Success) return;
|
||||
if (scene->push(std::move(svg)) != tvg::Result::Success) return;
|
||||
|
||||
//solid top circle and gradient bottom circle
|
||||
auto circ1 = tvgCircle1(colorStops3, 2);
|
||||
if (scene->push(move(circ1)) != tvg::Result::Success) return;
|
||||
if (scene->push(std::move(circ1)) != tvg::Result::Success) return;
|
||||
|
||||
auto circ2 = tvgCircle2(colorStops3, 2);
|
||||
if (scene->push(move(circ2)) != tvg::Result::Success) return;
|
||||
if (scene->push(std::move(circ2)) != tvg::Result::Success) return;
|
||||
|
||||
//inv mask applied to the main scene
|
||||
auto mask = tvg::Shape::gen();
|
||||
mask->appendCircle(400, 400, 15, 15);
|
||||
mask->fill(0, 0, 0, 255);
|
||||
scene->composite(move(mask), tvg::CompositeMethod::InvAlphaMask);
|
||||
scene->composite(std::move(mask), tvg::CompositeMethod::InvAlphaMask);
|
||||
|
||||
//save the tvg file
|
||||
auto saver = tvg::Saver::gen();
|
||||
if (saver->save(move(scene), EXAMPLE_DIR"/test.tvg") == tvg::Result::Success) {
|
||||
if (saver->save(std::move(scene), EXAMPLE_DIR"/test.tvg") == tvg::Result::Success) {
|
||||
saver->sync();
|
||||
cout << "Successfully exported to test.tvg, Please check the result using PictureTvg!" << endl;
|
||||
return;
|
||||
|
|
|
@ -34,7 +34,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
|
|||
auto shape = tvg::Shape::gen();
|
||||
shape->appendRect(-100, -100, 200, 200, 0, 0);
|
||||
shape->fill(255, 255, 255, 255);
|
||||
canvas->push(move(shape));
|
||||
canvas->push(std::move(shape));
|
||||
}
|
||||
|
||||
void tvgUpdateCmds(tvg::Canvas* canvas, float progress)
|
||||
|
@ -52,7 +52,7 @@ void tvgUpdateCmds(tvg::Canvas* canvas, float progress)
|
|||
shape->scale(1 - 0.75 * progress);
|
||||
shape->rotate(360 * progress);
|
||||
|
||||
canvas->push(move(shape));
|
||||
canvas->push(std::move(shape));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ Result Canvas::reserve(uint32_t n) noexcept
|
|||
|
||||
Result Canvas::push(unique_ptr<Paint> paint) noexcept
|
||||
{
|
||||
return pImpl->push(move(paint));
|
||||
return pImpl->push(std::move(paint));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -328,7 +328,7 @@ Result Shape::strokeColor(uint8_t* r, uint8_t* g, uint8_t* b, uint8_t* a) const
|
|||
|
||||
Result Shape::stroke(unique_ptr<Fill> f) noexcept
|
||||
{
|
||||
return pImpl->strokeFill(move(f));
|
||||
return pImpl->strokeFill(std::move(f));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -3694,6 +3694,6 @@ bool SvgLoader::close()
|
|||
unique_ptr<Paint> SvgLoader::paint()
|
||||
{
|
||||
this->done();
|
||||
if (root) return move(root);
|
||||
if (root) return std::move(root);
|
||||
else return nullptr;
|
||||
}
|
||||
|
|
|
@ -263,7 +263,7 @@ static void _applyComposition(Paint* paint, const SvgNode* node, const Box& vBox
|
|||
comp->transform(m);
|
||||
}
|
||||
|
||||
if (valid) paint->composite(move(comp), CompositeMethod::ClipPath);
|
||||
if (valid) paint->composite(std::move(comp), CompositeMethod::ClipPath);
|
||||
|
||||
node->style->clipPath.applying = false;
|
||||
}
|
||||
|
@ -285,9 +285,9 @@ static void _applyComposition(Paint* paint, const SvgNode* node, const Box& vBox
|
|||
if (node->transform) comp->transform(*node->transform);
|
||||
|
||||
if (compNode->node.mask.type == SvgMaskType::Luminance && !isMaskWhite) {
|
||||
paint->composite(move(comp), CompositeMethod::LumaMask);
|
||||
paint->composite(std::move(comp), CompositeMethod::LumaMask);
|
||||
} else {
|
||||
paint->composite(move(comp), CompositeMethod::AlphaMask);
|
||||
paint->composite(std::move(comp), CompositeMethod::AlphaMask);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -313,10 +313,10 @@ static void _applyProperty(SvgNode* node, Shape* vg, const Box& vBox, const stri
|
|||
|
||||
if (style->fill.paint.gradient->type == SvgGradientType::Linear) {
|
||||
auto linear = _applyLinearGradientProperty(style->fill.paint.gradient, vg, bBox, style->fill.opacity);
|
||||
vg->fill(move(linear));
|
||||
vg->fill(std::move(linear));
|
||||
} else if (style->fill.paint.gradient->type == SvgGradientType::Radial) {
|
||||
auto radial = _applyRadialGradientProperty(style->fill.paint.gradient, vg, bBox, style->fill.opacity);
|
||||
vg->fill(move(radial));
|
||||
vg->fill(std::move(radial));
|
||||
}
|
||||
} else if (style->fill.paint.url) {
|
||||
//TODO: Apply the color pointed by url
|
||||
|
@ -355,10 +355,10 @@ static void _applyProperty(SvgNode* node, Shape* vg, const Box& vBox, const stri
|
|||
|
||||
if (style->stroke.paint.gradient->type == SvgGradientType::Linear) {
|
||||
auto linear = _applyLinearGradientProperty(style->stroke.paint.gradient, vg, bBox, style->stroke.opacity);
|
||||
vg->stroke(move(linear));
|
||||
vg->stroke(std::move(linear));
|
||||
} else if (style->stroke.paint.gradient->type == SvgGradientType::Radial) {
|
||||
auto radial = _applyRadialGradientProperty(style->stroke.paint.gradient, vg, bBox, style->stroke.opacity);
|
||||
vg->stroke(move(radial));
|
||||
vg->stroke(std::move(radial));
|
||||
}
|
||||
} else if (style->stroke.paint.url) {
|
||||
//TODO: Apply the color pointed by url
|
||||
|
@ -676,7 +676,7 @@ static unique_ptr<Scene> _useBuildHelper(const SvgNode* node, const Box& vBox, c
|
|||
scene->transform(mSceneTransform);
|
||||
|
||||
if (node->node.use.symbol->node.symbol.overflowVisible) {
|
||||
finalScene = move(scene);
|
||||
finalScene = std::move(scene);
|
||||
} else {
|
||||
auto viewBoxClip = Shape::gen();
|
||||
viewBoxClip->appendRect(0, 0, width, height, 0, 0);
|
||||
|
@ -689,17 +689,17 @@ static unique_ptr<Scene> _useBuildHelper(const SvgNode* node, const Box& vBox, c
|
|||
viewBoxClip->transform(mClipTransform);
|
||||
|
||||
auto compositeLayer = Scene::gen();
|
||||
compositeLayer->composite(move(viewBoxClip), CompositeMethod::ClipPath);
|
||||
compositeLayer->push(move(scene));
|
||||
compositeLayer->composite(std::move(viewBoxClip), CompositeMethod::ClipPath);
|
||||
compositeLayer->push(std::move(scene));
|
||||
|
||||
auto root = Scene::gen();
|
||||
root->push(move(compositeLayer));
|
||||
root->push(std::move(compositeLayer));
|
||||
|
||||
finalScene = move(root);
|
||||
finalScene = std::move(root);
|
||||
}
|
||||
} else {
|
||||
if (!mathIdentity((const Matrix*)(&mUseTransform))) scene->transform(mUseTransform);
|
||||
finalScene = move(scene);
|
||||
finalScene = std::move(scene);
|
||||
}
|
||||
|
||||
return finalScene;
|
||||
|
@ -731,7 +731,7 @@ static unique_ptr<Scene> _sceneBuildHelper(const SvgNode* node, const Box& vBox,
|
|||
} else if ((*child)->type == SvgNodeType::Image) {
|
||||
auto image = _imageBuildHelper(*child, vBox, svgPath);
|
||||
if (image) {
|
||||
scene->push(move(image));
|
||||
scene->push(std::move(image));
|
||||
if (isMaskWhite) *isMaskWhite = false;
|
||||
}
|
||||
} else if ((*child)->type != SvgNodeType::Mask) {
|
||||
|
@ -745,7 +745,7 @@ static unique_ptr<Scene> _sceneBuildHelper(const SvgNode* node, const Box& vBox,
|
|||
*isMaskWhite = false;
|
||||
}
|
||||
}
|
||||
scene->push(move(shape));
|
||||
scene->push(std::move(shape));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -804,11 +804,11 @@ unique_ptr<Scene> svgSceneBuild(SvgLoaderData& loaderData, Box vBox, float w, fl
|
|||
viewBoxClip->fill(0, 0, 0, 255);
|
||||
|
||||
auto compositeLayer = Scene::gen();
|
||||
compositeLayer->composite(move(viewBoxClip), CompositeMethod::ClipPath);
|
||||
compositeLayer->push(move(docNode));
|
||||
compositeLayer->composite(std::move(viewBoxClip), CompositeMethod::ClipPath);
|
||||
compositeLayer->push(std::move(docNode));
|
||||
|
||||
auto root = Scene::gen();
|
||||
root->push(move(compositeLayer));
|
||||
root->push(std::move(compositeLayer));
|
||||
|
||||
loaderData.doc->node.doc.vx = vBox.x;
|
||||
loaderData.doc->node.doc.vy = vBox.y;
|
||||
|
|
|
@ -183,7 +183,7 @@ static unique_ptr<Fill> _parseShapeFill(const char *ptr, const char *end)
|
|||
|
||||
auto fillGradRadial = RadialGradient::gen();
|
||||
fillGradRadial->radial(x, y, radius);
|
||||
fillGrad = move(fillGradRadial);
|
||||
fillGrad = std::move(fillGradRadial);
|
||||
break;
|
||||
}
|
||||
case TVG_TAG_FILL_LINEAR_GRADIENT: {
|
||||
|
@ -202,7 +202,7 @@ static unique_ptr<Fill> _parseShapeFill(const char *ptr, const char *end)
|
|||
|
||||
auto fillGradLinear = LinearGradient::gen();
|
||||
fillGradLinear->linear(x1, y1, x2, y2);
|
||||
fillGrad = move(fillGradLinear);
|
||||
fillGrad = std::move(fillGradLinear);
|
||||
break;
|
||||
}
|
||||
case TVG_TAG_FILL_FILLSPREAD: {
|
||||
|
@ -301,7 +301,7 @@ static bool _parseShapeStroke(const char *ptr, const char *end, Shape *shape)
|
|||
case TVG_TAG_SHAPE_STROKE_FILL: {
|
||||
auto fill = _parseShapeFill(block.data, block.end);
|
||||
if (!fill) return false;
|
||||
shape->stroke(move(move(fill)));
|
||||
shape->stroke(std::move(fill));
|
||||
break;
|
||||
}
|
||||
case TVG_TAG_SHAPE_STROKE_DASHPTRN: {
|
||||
|
@ -334,7 +334,7 @@ static bool _parseShape(TvgBinBlock block, Paint* paint)
|
|||
case TVG_TAG_SHAPE_FILL: {
|
||||
auto fill = _parseShapeFill(block.data, block.end);
|
||||
if (!fill) return false;
|
||||
shape->fill(move(fill));
|
||||
shape->fill(std::move(fill));
|
||||
return true;
|
||||
}
|
||||
case TVG_TAG_SHAPE_COLOR: {
|
||||
|
|
|
@ -228,6 +228,6 @@ void TvgLoader::run(unsigned tid)
|
|||
unique_ptr<Paint> TvgLoader::paint()
|
||||
{
|
||||
this->done();
|
||||
if (root) return move(root);
|
||||
if (root) return std::move(root);
|
||||
return nullptr;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue