aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/declarative/items/qsgcontext2d.cpp15
-rw-r--r--src/declarative/scenegraph/qsgdistancefieldglyphcache.cpp2
2 files changed, 14 insertions, 3 deletions
diff --git a/src/declarative/items/qsgcontext2d.cpp b/src/declarative/items/qsgcontext2d.cpp
index 2e60de189f..9dddc99557 100644
--- a/src/declarative/items/qsgcontext2d.cpp
+++ b/src/declarative/items/qsgcontext2d.cpp
@@ -786,12 +786,15 @@ static QScriptValue ctx2d_isPointInPath(QScriptContext *c, QScriptEngine *e)
// text
static QScriptValue ctx2d_font(QScriptContext *c, QScriptEngine *e)
{
+ return QScriptValue();
}
static QScriptValue ctx2d_textAlign(QScriptContext *c, QScriptEngine *e)
{
+ return QScriptValue();
}
static QScriptValue ctx2d_textBaseline(QScriptContext *c, QScriptEngine *e)
{
+ return QScriptValue();
}
static QScriptValue ctx2d_fillText(QScriptContext *c, QScriptEngine *e)
{
@@ -846,53 +849,61 @@ static QScriptValue ctx2d_drawImage(QScriptContext *c, QScriptEngine *e)
static QScriptValue ctx2d_createImageData(QScriptContext *c, QScriptEngine *e)
{
//#TODO
+ return QScriptValue();
}
static QScriptValue ctx2d_getImageData(QScriptContext *c, QScriptEngine *e)
{
//#TODO
+ return QScriptValue();
}
static QScriptValue ctx2d_putImageData(QScriptContext *c, QScriptEngine *e)
{
//#TODO
+ return QScriptValue();
}
//Image Data Interface
static QScriptValue ctx2d_imageData_data(QScriptContext *c, QScriptEngine *e)
{
//#TODO
+ return QScriptValue();
}
static QScriptValue ctx2d_imageData_height(QScriptContext *c, QScriptEngine *e)
{
//#TODO
+ return QScriptValue();
}
static QScriptValue ctx2d_imageData_width(QScriptContext *c, QScriptEngine *e)
{
//#TODO
+ return QScriptValue();
}
//CanvasPixelArray interface
static QScriptValue ctx2d_pixelArray_length(QScriptContext *c, QScriptEngine *e)
{
//#TODO
+ return QScriptValue();
}
//getter/setter by index how to?
static QScriptValue ctx2d_pixelArray(QScriptContext *c, QScriptEngine *e)
{
//#TODO
+ return QScriptValue();
}
//CanvasGradient interface
static QScriptValue ctx2d_gradient_addColorStop(QScriptContext *c, QScriptEngine *e)
{
//#TODO
-
+ return QScriptValue();
}
//TextMetrics
static QScriptValue ctx2d_textMetrics_width(QScriptContext *c, QScriptEngine *e)
{
//#TODO
-
+ return QScriptValue();
}
diff --git a/src/declarative/scenegraph/qsgdistancefieldglyphcache.cpp b/src/declarative/scenegraph/qsgdistancefieldglyphcache.cpp
index 0011492053..e216dd4699 100644
--- a/src/declarative/scenegraph/qsgdistancefieldglyphcache.cpp
+++ b/src/declarative/scenegraph/qsgdistancefieldglyphcache.cpp
@@ -941,7 +941,7 @@ void QSGDistanceFieldGlyphCache::updateCache()
QFile file(key);
if (file.open(QFile::ReadOnly)) {
int fileSize = file.size();
- int dim = sqrt(fileSize);
+ int dim = sqrt(float(fileSize));
QByteArray blob = file.readAll();
glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y, dim, dim, GL_ALPHA, GL_UNSIGNED_BYTE, blob.constData());
continue;