mirror of
https://github.com/danbulant/node-x11
synced 2026-05-19 04:18:35 +00:00
fix: add length to AddGlyph
This commit is contained in:
parent
79cf131815
commit
54bd06c136
1 changed files with 15 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
|||
// this will be eventually moved to lib/node-x11/extensions
|
||||
|
||||
|
||||
var x11 = require('..');
|
||||
|
||||
|
|
@ -375,7 +375,8 @@ exports.requireExt = function(display, callback)
|
|||
var paddedLength = xutil.padded_length(imageBytes);
|
||||
var len = numGlyphs * 4 + paddedLength / 4 + 3;
|
||||
// TODO: check length, use bigReq
|
||||
X.pack_stream.pack('CCSL', [ext.majorOpcode, 20, len, gsid]);
|
||||
X.pack_stream.pack('CCSLL', [ext.majorOpcode, 20, len, gsid, glyps.length]);
|
||||
|
||||
for (i = 0; i < numGlyphs; i++)
|
||||
X.pack_stream.pack('L', glyph[i].id);
|
||||
for (i = 0; i < numGlyphs; i++)
|
||||
|
|
@ -388,6 +389,18 @@ exports.requireExt = function(display, callback)
|
|||
}
|
||||
|
||||
//AddGlyphsFromPicture, opcode=21 (not in spec)
|
||||
// FreeGlyps - 22
|
||||
|
||||
ext.CompositeGlyphs8 = function(op, src, dst, pictformat, gsid, srcX, srcY, dstX, dstY, glyphs)
|
||||
{
|
||||
X.seq_num++;
|
||||
X.pack_stream.pack(
|
||||
'CCSCxxxLLLssssssSS',
|
||||
[ext.majorOpcode, 8, 9, op, src, mask, dst, srcX, srcY, maskX, maskY, dstX, dstY, width, height]
|
||||
)
|
||||
.flush();
|
||||
}
|
||||
|
||||
|
||||
// TODO: implement xutil-like code https://github.com/alexer/python-xlib-render/blob/master/xutil.py
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue