|
@ -97,6 +97,8 @@ Context2d::Initialize(Handle<Object> target) { |
|
|
NODE_SET_PROTOTYPE_METHOD(t, "clip", Clip); |
|
|
NODE_SET_PROTOTYPE_METHOD(t, "clip", Clip); |
|
|
NODE_SET_PROTOTYPE_METHOD(t, "fill", Fill); |
|
|
NODE_SET_PROTOTYPE_METHOD(t, "fill", Fill); |
|
|
NODE_SET_PROTOTYPE_METHOD(t, "stroke", Stroke); |
|
|
NODE_SET_PROTOTYPE_METHOD(t, "stroke", Stroke); |
|
|
|
|
|
NODE_SET_PROTOTYPE_METHOD(t, "fillText", FillText); |
|
|
|
|
|
NODE_SET_PROTOTYPE_METHOD(t, "strokeText", StrokeText); |
|
|
NODE_SET_PROTOTYPE_METHOD(t, "fillRect", FillRect); |
|
|
NODE_SET_PROTOTYPE_METHOD(t, "fillRect", FillRect); |
|
|
NODE_SET_PROTOTYPE_METHOD(t, "strokeRect", StrokeRect); |
|
|
NODE_SET_PROTOTYPE_METHOD(t, "strokeRect", StrokeRect); |
|
|
NODE_SET_PROTOTYPE_METHOD(t, "clearRect", ClearRect); |
|
|
NODE_SET_PROTOTYPE_METHOD(t, "clearRect", ClearRect); |
|
@ -767,6 +769,32 @@ Context2d::Stroke(const Arguments &args) { |
|
|
return Undefined(); |
|
|
return Undefined(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
* Fill text at (x, y). |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
Handle<Value> |
|
|
|
|
|
Context2d::FillText(const Arguments &args) { |
|
|
|
|
|
HandleScope scope; |
|
|
|
|
|
Context2d *context = ObjectWrap::Unwrap<Context2d>(args.This()); |
|
|
|
|
|
cairo_t *ctx = context->getContext(); |
|
|
|
|
|
SET_SOURCE(context->state->fill); |
|
|
|
|
|
return Undefined(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
* Stroke text at (x ,y). |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
Handle<Value> |
|
|
|
|
|
Context2d::StrokeText(const Arguments &args) { |
|
|
|
|
|
HandleScope scope; |
|
|
|
|
|
Context2d *context = ObjectWrap::Unwrap<Context2d>(args.This()); |
|
|
|
|
|
cairo_t *ctx = context->getContext(); |
|
|
|
|
|
SET_SOURCE(context->state->fill); |
|
|
|
|
|
return Undefined(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/*
|
|
|
/*
|
|
|
* Adds a point to the current subpath. |
|
|
* Adds a point to the current subpath. |
|
|
*/ |
|
|
*/ |
|
|