GraphicElement改为使用QImage
parent
16bfba76e4
commit
e004809164
|
@ -1033,8 +1033,9 @@ void main()
|
||||||
if (lineType == 2 || intTest % 2 == int(lineType))
|
if (lineType == 2 || intTest % 2 == int(lineType))
|
||||||
{
|
{
|
||||||
hitElement = true;
|
hitElement = true;
|
||||||
elementColor = vec4(1, 1, 0, 1);
|
//elementColor = vec4(1, 1, 0, 1);
|
||||||
// drawLine(minDistance / strokeWidth, styleIndex, elementColor, metallicRoughness);
|
vec2 metallicRoughness;
|
||||||
|
drawLine(minDistance / strokeWidth, styleIndex, elementColor, metallicRoughness);
|
||||||
}
|
}
|
||||||
else if (p3Last == p[0])
|
else if (p3Last == p[0])
|
||||||
hitElement = false;
|
hitElement = false;
|
||||||
|
|
|
@ -45,12 +45,12 @@ PixelPath GroupElement::getPaintObject() const
|
||||||
//TODO: apply styles and send back
|
//TODO: apply styles and send back
|
||||||
PixelPath SimpleElement::getPaintObject(std::vector<Renderer::ElementStyleStrokeDemo> styles) const {
|
PixelPath SimpleElement::getPaintObject(std::vector<Renderer::ElementStyleStrokeDemo> styles) const {
|
||||||
PixelPath result;
|
PixelPath result;
|
||||||
Renderer::ElementStyleStrokeDemo demo;
|
Renderer::ElementStyleStrokeDemo demo(2);
|
||||||
qDebug() << (renderer == nullptr) << "------------";
|
qDebug() << (renderer == nullptr) << "------------";
|
||||||
//auto [img, mov] = renderer->drawElement(painterPath,demo,1.0,false);
|
auto [img, mov] = renderer->drawElement(painterPath, demo, 1.0, false);
|
||||||
//qDebug() << img << " ------";
|
//qDebug() << img << " ------";
|
||||||
//result.addImage(img, mov);
|
result.addImage(img, mov);
|
||||||
result.addPath(painterPath);
|
//result.addPath(painterPath);
|
||||||
// QImage img(80,80,QImage::Format_ARGB32);
|
// QImage img(80,80,QImage::Format_ARGB32);
|
||||||
// QPainter pt(&img);
|
// QPainter pt(&img);
|
||||||
//pt.setPen(QPen(Qt::red, 2));
|
//pt.setPen(QPen(Qt::red, 2));
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
#include "MainWindow.h"
|
#include "MainWindow.h"
|
||||||
#include "Renderer/Painting/CubicBezier.h"
|
|
||||||
#include <QGuiApplication>
|
#include <QGuiApplication>
|
||||||
#include <QtWidgets/QApplication>
|
#include <QtWidgets/QApplication>
|
||||||
#include <FramelessHelper/Core/private/framelessconfig_p.h>
|
#include <FramelessHelper/Core/private/framelessconfig_p.h>
|
||||||
|
|
||||||
using Renderer::CubicBezier;
|
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
_declspec(dllexport) unsigned long NvOptimusEnablement = 0x00000001;
|
_declspec(dllexport) unsigned long NvOptimusEnablement = 0x00000001;
|
||||||
|
@ -20,7 +17,7 @@ int main(int argc, char* argv[])
|
||||||
//QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
//QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||||
QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
|
QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
FramelessHelper::Core::setApplicationOSThemeAware();
|
//FramelessHelper::Core::setApplicationOSThemeAware();
|
||||||
FramelessConfig::instance()->set(Global::Option::ForceNonNativeBackgroundBlur);
|
FramelessConfig::instance()->set(Global::Option::ForceNonNativeBackgroundBlur);
|
||||||
FramelessConfig::instance()->set(Global::Option::EnableBlurBehindWindow);
|
FramelessConfig::instance()->set(Global::Option::EnableBlurBehindWindow);
|
||||||
FramelessConfig::instance()->set(Global::Option::CenterWindowBeforeShow);
|
FramelessConfig::instance()->set(Global::Option::CenterWindowBeforeShow);
|
||||||
|
|
Loading…
Reference in New Issue