-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #186 from gjsify/re-export-cairo
Add basic cairo overrides
- Loading branch information
Showing
45 changed files
with
885 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import Cairo from 'cairo'; | ||
|
||
const imageSurface = new Cairo.ImageSurface(Cairo.Format.ARGB32, 10, 10); | ||
|
||
const pngSurface = Cairo.ImageSurface.createFromPNG('filename.png'); | ||
|
||
const pdfSurface = new Cairo.PDFSurface('filename.pdf', 32, 32); | ||
|
||
const psSurface = new Cairo.PSSurface('filename.ps', 32, 32); | ||
|
||
const svgSurface = new Cairo.SVGSurface('filename.svg', 32, 32); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"name": "@ts-for-gir-example/cairo-surfaces-tsc", | ||
"version": "4.0.0-beta.12", | ||
"description": "Simple cairo-surfaces GJS example", | ||
"type": "module", | ||
"private": true, | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"build:app": "tsc", | ||
"build": "yarn build:app", | ||
"start:app": "gjs -m dist/main.js", | ||
"debug:app": "GTK_DEBUG=interactive yarn start:app", | ||
"start": "yarn build && yarn start:app", | ||
"validate": "yarn validate:types", | ||
"validate:types": "tsc --noEmit", | ||
"clear": "rm -rf dist @types" | ||
}, | ||
"author": "Pascal Garber <[email protected]>", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"typescript": "^5.5.3" | ||
}, | ||
"dependencies": { | ||
"@girs/gjs": "workspace:^" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"compilerOptions": { | ||
"lib": ["ESNext"], | ||
"types": ["@girs/gjs", "@girs/gjs/dom"], | ||
"target": "ESNext", | ||
"module": "ESNext", | ||
"moduleResolution": "bundler", | ||
"strict": true, | ||
"noImplicitAny": true, | ||
"strictNullChecks": true, | ||
"noImplicitThis": true, | ||
"alwaysStrict": true, | ||
"outDir": "./dist" | ||
}, | ||
"files": [ | ||
"main.ts", | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.