mirror of
https://github.com/alibaba/GCanvas.git
synced 2026-02-01 14:33:10 +00:00
1.change ratio to original in gcanvas src
2.add depoly condition only on master
This commit is contained in:
parent
0ea3a655a5
commit
1d6f1d4bf4
@ -47,5 +47,5 @@ deploy:
|
||||
skip_cleanup: true
|
||||
on:
|
||||
repo: luckzhiwei/GCanvas
|
||||
all_branches: true
|
||||
branch: master
|
||||
tags: false
|
||||
@ -27,7 +27,7 @@ namespace gcanvas {
|
||||
mStyle = Style::NORMAL;
|
||||
mVariant = Variant::NORMAL;
|
||||
mWeight = Weight::NORMAL;
|
||||
mSize = 12 * 1;
|
||||
mSize = 12 * ratio;
|
||||
mRatio = ratio;
|
||||
mFamily = "sans-serif";
|
||||
mAscender = -1;
|
||||
|
||||
@ -2168,10 +2168,10 @@ namespace gcanvas {
|
||||
int readPixels(GCanvasWeex *obj, const char *&p) {
|
||||
const int *tokens = ParseTokensInt(p, 6);
|
||||
float ratio = obj->GetDevicePixelRatio();
|
||||
GLint x = tokens[0] * 1;
|
||||
GLint y = tokens[1] * 1;
|
||||
GLsizei width = tokens[2] * 1;
|
||||
GLsizei height = tokens[3] * 1;
|
||||
GLint x = tokens[0] * ratio;
|
||||
GLint y = tokens[1] * ratio;
|
||||
GLsizei width = tokens[2] * ratio;
|
||||
GLsizei height = tokens[3] * ratio;
|
||||
GLenum format = tokens[4];
|
||||
GLenum type = tokens[5];
|
||||
|
||||
@ -2201,8 +2201,8 @@ namespace gcanvas {
|
||||
GLenum target = tokens[0];
|
||||
GLenum internalformat = tokens[1];
|
||||
float ratio = obj->GetDevicePixelRatio();
|
||||
GLsizei width = tokens[2] * 1;
|
||||
GLsizei height = tokens[3] * 1;
|
||||
GLsizei width = tokens[2] * ratio;
|
||||
GLsizei height = tokens[3] * ratio;
|
||||
|
||||
LOG_D("[webgl::exec] glRenderbufferStorage(%s, %s, %d, %d)",
|
||||
GetMacroValDebug(target), GetMacroValDebug(internalformat), width, height);
|
||||
@ -2227,10 +2227,10 @@ namespace gcanvas {
|
||||
int scissor(GCanvasWeex *obj, const char *&p) {
|
||||
const int *tokens = ParseTokensInt(p, 4);
|
||||
float ratio = obj->GetDevicePixelRatio();
|
||||
GLint x = tokens[0] * 1;
|
||||
GLint y = tokens[1] * 1;
|
||||
GLsizei width = tokens[2] * 1;
|
||||
GLsizei height = tokens[3] * 1;
|
||||
GLint x = tokens[0] * ratio;
|
||||
GLint y = tokens[1] * ratio;
|
||||
GLsizei width = tokens[2] * ratio;
|
||||
GLsizei height = tokens[3] * ratio;
|
||||
|
||||
LOG_D("[webgl::exec] glScissor(%d, %d, %d, %d)", x, y, width, height);
|
||||
glScissor(x, y, width, height);
|
||||
@ -2900,14 +2900,14 @@ namespace gcanvas {
|
||||
const float *tokens = ParseTokensFloat(p, 4);
|
||||
float ratio = obj->GetDevicePixelRatio();
|
||||
LOG_D("[webgl::exec] glViewport(%f, %f, %f, %f)",
|
||||
tokens[0] * 1,
|
||||
tokens[1] * 1,
|
||||
tokens[2] * 1,
|
||||
tokens[3] * 1);
|
||||
glViewport(tokens[0] * 1,
|
||||
tokens[1] * 1,
|
||||
tokens[2] * 1,
|
||||
tokens[3] * 1);
|
||||
tokens[0] * ratio,
|
||||
tokens[1] * ratio,
|
||||
tokens[2] * ratio,
|
||||
tokens[3] * ratio);
|
||||
glViewport(tokens[0] * ratio,
|
||||
tokens[1] * ratio,
|
||||
tokens[2] * ratio,
|
||||
tokens[3] * ratio);
|
||||
return kContinue;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user