
# IComponentMetafilePainter interface

The IComponentMetaFilePainter interface is an internal interface that provides a mechanism to generate images into library reports within the Schematic Library Editor.

```csharp
public interface IComponentMetafilePainter
```

**Namespace:** SCH · **Assembly:** Altium.SDK.Interfaces

## Methods

| Method | Returns | Description |
| --- | --- | --- |
| [DrawToMetafile](#drawtometafile) | `void` | This is for internal use. |
| [SetComponent](#setcomponent) | `void` | This is for internal use. |

### DrawToMetafile

This is for internal use.

```csharp
void DrawToMetafile(int argPartIndex, TPaintColorMode argPaintColorMode, TPaintScaleMode argScaleMode, string argFileName);
void DrawToMetafile(int argPartIndex, int argPaintColorMode, int argScaleMode, string argFileName);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argPartIndex` | `int` | value |
| `argPaintColorMode` | [TPaintColorMode](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/TPaintColorMode.md) | value |
| `argScaleMode` | [TPaintScaleMode](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/TPaintScaleMode.md) | value |
| `argFileName` | `string` | value |

**Returns:** nothing (`void`)

The first overload is an extension method of `IComponentMetafilePainterHelper` (`using SCH;`) with typed parameters; the second is declared by the interface.

**See also:** [TPaintColorMode](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/TPaintColorMode.md), [TPaintScaleMode](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/TPaintScaleMode.md)

### SetComponent

This is for internal use.

```csharp
void SetComponent(string argLibReference, string argLibraryPath);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argLibReference` | `string` | value |
| `argLibraryPath` | `string` | value |

**Returns:** nothing (`void`)

## Returned by

[ISch_ServerInterface.CreateComponentMetafilePainter](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_ServerInterface.md#createcomponentmetafilepainter)
