gis-common 5.1.35 → 5.1.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gis-common.es.js +117 -2
- package/dist/gis-common.umd.js +1 -1
- package/dist/index.d.ts +60 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -175,6 +175,46 @@ export declare class AudioPlayer {
|
|
|
175
175
|
|
|
176
176
|
export declare type BBox = [number, number, number, number];
|
|
177
177
|
|
|
178
|
+
export declare class BinaryReader {
|
|
179
|
+
private _buffer;
|
|
180
|
+
private _view;
|
|
181
|
+
private _offset;
|
|
182
|
+
private _littleEndian;
|
|
183
|
+
constructor(buffer: ArrayBuffer, littleEndian?: boolean);
|
|
184
|
+
/** 当前读取位置 */
|
|
185
|
+
get offset(): number;
|
|
186
|
+
/** 原始 ArrayBuffer */
|
|
187
|
+
get buffer(): ArrayBuffer;
|
|
188
|
+
/** 底层 DataView */
|
|
189
|
+
get dataView(): DataView;
|
|
190
|
+
/** 重置读取位置到开头 */
|
|
191
|
+
reset(): void;
|
|
192
|
+
/** 跳转到指定位置 */
|
|
193
|
+
seek(offset: number): void;
|
|
194
|
+
/** 跳过指定字节数 */
|
|
195
|
+
skip(bytes: number): void;
|
|
196
|
+
/** 读取 1 字节无符号整数 */
|
|
197
|
+
readUint8(): number;
|
|
198
|
+
/** 读取 2 字节无符号整数 */
|
|
199
|
+
readUint16(): number;
|
|
200
|
+
/** 读取 4 字节无符号整数 */
|
|
201
|
+
readUint32(): number;
|
|
202
|
+
/** 读取 1 字节有符号整数 */
|
|
203
|
+
readInt8(): number;
|
|
204
|
+
/** 读取 2 字节有符号整数 */
|
|
205
|
+
readInt16(): number;
|
|
206
|
+
/** 读取 4 字节有符号整数 */
|
|
207
|
+
readInt32(): number;
|
|
208
|
+
/** 读取 4 字节浮点数 (float32) */
|
|
209
|
+
readFloat32(): number;
|
|
210
|
+
/** 读取 8 字节浮点数 (float64) */
|
|
211
|
+
readFloat64(): number;
|
|
212
|
+
/** 读取指定长度的 buffer 片段 */
|
|
213
|
+
readBuffer(length: number): ArrayBuffer;
|
|
214
|
+
/** 读取指定长度的字符串 */
|
|
215
|
+
readString(length: number): string;
|
|
216
|
+
}
|
|
217
|
+
|
|
178
218
|
declare interface BrowserType {
|
|
179
219
|
type: string;
|
|
180
220
|
version: string;
|
|
@@ -293,15 +333,32 @@ export declare class CanvasDrawer {
|
|
|
293
333
|
* @throws 当Canvas context为null或undefined时抛出错误
|
|
294
334
|
*/
|
|
295
335
|
drawArc({ x, y }: ICoordinate, radius: number, startAngle: number, endAngle: number, anticlockwise: boolean, isFill: boolean, bgColor: string): void;
|
|
296
|
-
|
|
336
|
+
/**
|
|
337
|
+
* 绘制图像
|
|
338
|
+
*
|
|
339
|
+
* @param coordinate 绘制位置的坐标
|
|
340
|
+
* @param image 要绘制的图像(ImageBitmap)
|
|
341
|
+
* @param options 绘制选项,包括宽度、高度和旋转角度
|
|
342
|
+
* @throws 当画布上下文不存在时抛出错误
|
|
343
|
+
*/
|
|
344
|
+
drawImage({ x, y }: ICoordinate, image: ImageBitmap | HTMLImageElement, options?: {
|
|
297
345
|
width?: number;
|
|
298
346
|
height?: number;
|
|
299
347
|
angle?: number;
|
|
300
348
|
}): void;
|
|
349
|
+
/**
|
|
350
|
+
* 绘制文本
|
|
351
|
+
*
|
|
352
|
+
* @param coordinate 绘制位置的坐标
|
|
353
|
+
* @param text 要绘制的文本内容
|
|
354
|
+
* @param options 绘制选项,包括字体和颜色
|
|
355
|
+
* @throws 当画布上下文不存在时抛出错误
|
|
356
|
+
*/
|
|
301
357
|
drawText({ x, y }: ICoordinate, text: string, options: {
|
|
302
358
|
font: string;
|
|
303
359
|
color: string;
|
|
304
360
|
}): void;
|
|
361
|
+
destroy(): void;
|
|
305
362
|
static createCanvas(width?: number, height?: number): HTMLCanvasElement;
|
|
306
363
|
}
|
|
307
364
|
|
|
@@ -1145,7 +1202,7 @@ export declare const ImageUtil: {
|
|
|
1145
1202
|
* @throws 如果解析base64数据失败,则抛出异常
|
|
1146
1203
|
*/
|
|
1147
1204
|
copyImage(url: string): Promise<void>;
|
|
1148
|
-
readImage(url: string): Promise<
|
|
1205
|
+
readImage(url: string): Promise<HTMLImageElement>;
|
|
1149
1206
|
};
|
|
1150
1207
|
|
|
1151
1208
|
export declare type ItalicPosition = 'topleft' | 'topright' | 'bottomleft' | 'bottomright';
|
|
@@ -1332,7 +1389,7 @@ export declare const OptimizeUtil: {
|
|
|
1332
1389
|
*
|
|
1333
1390
|
* @param fun 要递归调用的函数。
|
|
1334
1391
|
* @param frequency 每次调用函数之间的时间间隔,单位为毫秒,默认为500毫秒。
|
|
1335
|
-
* @param duration
|
|
1392
|
+
* @param duration 函数递归调用的总时长,单位为毫秒,默认为不限制。
|
|
1336
1393
|
*/
|
|
1337
1394
|
recurve(fun: Function, frequency?: number, duration?: number): void;
|
|
1338
1395
|
/**
|