From 486d49c6cb514ffbfcefe6e188c0f9c3fb416acc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Wi=C5=9Bniewski?= Date: Thu, 21 Dec 2023 11:32:26 +0100 Subject: [PATCH] Bump version to 2.1.1 and update docs --- CHANGELOG.md | 6 ++++++ README.md | 10 +++++++--- package-lock.json | 4 ++-- package.json | 2 +- src/extension.ts | 32 ++++++++++++++++++-------------- 5 files changed, 34 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd04eac..7cea92f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/README.md b/README.md index 4b6b184..535df53 100644 --- a/README.md +++ b/README.md @@ -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 > @@ -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 diff --git a/package-lock.json b/package-lock.json index 78dfb3e..fe07f59 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "gerber-x3-x2-format-support", - "version": "2.1.0", + "version": "2.1.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "gerber-x3-x2-format-support", - "version": "2.1.0", + "version": "2.1.1", "license": "SEE LICENSE IN LICENSE.md", "dependencies": { "@vscode/vsce": "^2.22.0", diff --git a/package.json b/package.json index 272c603..0b157a8 100644 --- a/package.json +++ b/package.json @@ -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": [ { diff --git a/src/extension.ts b/src/extension.ts index e834cdc..e39369f 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -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( @@ -681,6 +684,7 @@ function getWebviewContent(base64Image: string): string { border-style: dashed; border-color: white; border-width: 1px; + image-rendering: pixelated; } `;