New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test rendering/devtools project #84
base: master
Are you sure you want to change the base?
Conversation
2f15b88
to
38a07a8
Compare
tests/Render/runner.js
Outdated
@@ -34,6 +34,8 @@ | |||
var ctx = canvas.getContext('2d'); | |||
canvas.height = img.height; | |||
canvas.width = img.width; | |||
ctx.fillStyle = "rgb(255,255,255)"; | |||
ctx.fillRect (0,0, canvas.width,canvas.width); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
canvas.width
two times? Also, code style.
Should be ctx.fillRect(0, 0, canvas.width, canvas.height);
.
This in fact does two things («integrate with qmlweb-dev» does not explain it good enough).
|
Could you split that into two separate commits, btw? |
will split. |
3812753
to
a650876
Compare
rebased and moved screenshot background to separate commit |
Shouldn't we use git submodules instead of a script ? |
@Plaristote Yes, this should definitely use git submodules or a devdependency via npm — that depends on the purpose of the tools. Note: I have not reviewed that repo yet, perhaps that should be done first before pulling this in here as a dependency. |
@Plaristote I took a quick look at the repo, and that most probably should be transformed into a module that just provides the screenshot function. See also #81. |
i created two new projects:
qmlbook/shorty a fork of qmlbook/shorty which is a simple screenshot utility. I modified it so you can specify a loader qml (which handles the actual screenshot creation) and a test qml to be rendered. (we should probably rename or merge it into qmlweb-dev)
qmlweb-dev is a project that can be cloned into the qmlweb main project. we can put optional dev stuff here. for now it contains the screenshot renderer.
just a proof of concept for now, but would like to hear your thoughts.
Clone and build:
in your qmlweb folder:
clone https://github.com/qmlweb/qmlweb-dev.git dev
cd dev
./build.sh
Render tests:
node dev/render.js