Home > LIB_Footprint > getRenderImage
LIB_Footprint.getRenderImage() method
This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Get the footprint render image
Signature
typescript
function getRenderImage(source: {
footprintUuid: string;
libraryUuid: string;
}): Promise<Blob | undefined>;1
2
3
4
2
3
4
Parameters
Parameter | Type | Description |
|---|---|---|
source | { footprintUuid: string; libraryUuid: string } |
Returns
Promise<Blob | undefined>
Footprint render image
Example
javascript
// 1. 搜索系统库,取一个封装作为渲染来源
const [source] = await eda.lib_Footprint.search('0402', undefined, undefined, 1, 1);
// 2. 获取渲染图(PNG Blob)
const blob = await eda.lib_Footprint.getRenderImage({
footprintUuid: source.uuid,
libraryUuid: source.libraryUuid,
});
// 3. Blob 可转成 URL 直接展示:URL.createObjectURL(blob)
console.log('sourceName:', source.name);
console.log('imageSize:', blob.size);
console.log('imageType:', blob.type);1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13