Skip to content

Commit

Permalink
Bump version to 2.1.1 and update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Argmaster committed Dec 21, 2023
1 parent 1a83bb9 commit 486d49c
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 20 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ this file.
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to
structure this file.

## [2.1.1]

- Improved Python environment discovery.
- Improved Gerber file rendering feature and display view. It now allows zooming with
`ctrl` + `scroll` and move with `hold left mouse button` + `move mouse`.

## [2.1.0]

- Added integration with [PyGerber](https://github.com/Argmaster/pygerber) language
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Afterwards all extension features should be available.

### 2. Language Server using PyGerber

This extension utilizes PyGerber 2.1.0 builtin Gerber language server.
This extension utilizes PyGerber 2.1.0+ builtin Gerber language server.

> ⚠️ Warning
>
Expand All @@ -53,9 +53,13 @@ is recommended to use this option, as alternatives are not well polished.

![image](https://github.com/Argmaster/vscode-gerber-format-support/assets/56170852/64725da7-1e6e-4281-87a8-e4105d6b89f9)

![image](https://github.com/Argmaster/vscode-gerber-format-support/assets/56170852/ffd7e7a7-2d95-41ec-bfc5-b60e68219f98)
![image](https://github.com/Argmaster/pygerber/assets/56170852/d9243480-ffd4-4d40-8f26-036f0179427a)

Click on the image, hold Ctrl and use mouse wheel to zoom in and out.
![image](https://github.com/Argmaster/pygerber/assets/56170852/d1f27dc6-a057-4c7b-b99a-fe80dfd9860e)

This view now allows zooming with `ctrl` + `scroll` and move with
`hold left mouse button` + `move mouse`. Window must be focused to allow those actions.
To focus render view click inside it.

## Issues and bugs

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "gerber-x3-x2-format-support",
"displayName": "Gerber X3/X2 Format Support",
"description": "Visual Studio Code support for Gerber X3/X2 file format",
"version": "2.1.0",
"version": "2.1.1",
"license": "SEE LICENSE IN LICENSE.md",
"maintainers": [
{
Expand Down
32 changes: 18 additions & 14 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -538,21 +538,24 @@ class ExtensionObject {
location: vscode.ProgressLocation.Notification,
},
async () => {
const command = [
"-m",
"pygerber",
"raster-2d",
`"${filePath}"`,
"--style",
this.userSettings.layerStyle,
"--output",
`"${outputFilePath}"`,
"--dpi",
this.userSettings.renderDpi,
].join(" ");

traceLog("Requested render of current file");
traceLog(command);

const { code, stdout, stderr } =
await this.getPythonEnvironment().executePythonCommand(
[
"-m",
"pygerber",
"raster-2d",
filePath,
"--style",
this.userSettings.layerStyle,
"--output",
outputFilePath,
"--dpi",
this.userSettings.renderDpi,
].join(" ")
);
await this.getPythonEnvironment().executePythonCommand(command);

if (code === 0) {
vscode.window.showInformationMessage(
Expand Down Expand Up @@ -681,6 +684,7 @@ function getWebviewContent(base64Image: string): string {
border-style: dashed;
border-color: white;
border-width: 1px;
image-rendering: pixelated;
}
`;

Expand Down

0 comments on commit 486d49c

Please sign in to comment.