Skip to content

Commit

Permalink
add copyDestBMP in koptcontext
Browse files Browse the repository at this point in the history
  • Loading branch information
chrox committed Oct 24, 2013
1 parent 669fb3d commit a2b327d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions koptcontext.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,13 @@ static int kcGetLanguage(lua_State *L) {
return 1;
}

static int kcCopyDestBMP(lua_State *L) {
KOPTContext *kc_dst = (KOPTContext*) luaL_checkudata(L, 1, "koptcontext");
KOPTContext *kc_src = (KOPTContext*) luaL_checkudata(L, 2, "koptcontext");
bmp_copy(&kc_dst->dst, &kc_src->dst);
return 0;
}

int kcGetWordBoxes(lua_State *L, int box_type) {
KOPTContext *kc = (KOPTContext*) luaL_checkudata(L, 1, "koptcontext");
int x = luaL_checkint(L, 2);
Expand Down Expand Up @@ -507,6 +514,7 @@ static const struct luaL_Reg koptcontext_meth[] = {
{"setLanguage",kcSetLanguage},
{"getLanguage", kcGetLanguage},

{"copyDestBMP", kcCopyDestBMP},
{"getReflowedWordBoxes", kcGetReflowedWordBoxes},
{"getNativeWordBoxes", kcGetNativeWordBoxes},
{"reflowToNativePosTransform", kcReflowToNativePosTransform},
Expand Down

0 comments on commit a2b327d

Please sign in to comment.