Skip to content

Commit 532034a

Browse files
updated
1 parent cc99749 commit 532034a

29 files changed

+48
-1449
lines changed

__debug_bin

-5.13 MB
Binary file not shown.

canvas.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package main
22

33
import (
44
"fmt"
5-
"gopaint/gdiplus"
65
. "gopaint/reza"
76
"image"
87
"image/draw"
@@ -13,6 +12,8 @@ import (
1312
"strconv"
1413
"strings"
1514

15+
"github.com/shahfarhadreza/go-gdiplus"
16+
1617
win "github.com/lxn/win"
1718
)
1819

@@ -371,7 +372,7 @@ func (canvas *DrawingCanvas) OnResize(rect *Rect) {
371372
if canvas.context != nil {
372373
canvas.context.Dispose()
373374
}
374-
canvas.context = gdiplus.NewGraphicsFromHDC(canvas.mhdc)
375+
canvas.context = gdiplus.NewGraphicsFromHDC(gdiplus.HDC(canvas.mhdc))
375376
//canvas.context.SetSmoothingMode(gdiplus.SmoothingModeHighSpeed)
376377
}
377378

cursors/PencilToolCursor.cur

2.19 KB
Binary file not shown.

drawingimage.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
package main
22

33
import (
4-
"gopaint/gdiplus"
54
. "gopaint/reza"
65
"image"
76
"image/color"
87
"strconv"
98

9+
"github.com/shahfarhadreza/go-gdiplus"
10+
1011
"github.com/fogleman/gg"
1112
win "github.com/lxn/win"
1213
)
@@ -35,7 +36,7 @@ func NewDrawingImage(width, height int) *DrawingImage {
3536
win.SelectObject(this.memdc, win.HGDIOBJ(this.hbitmap))
3637
win.ReleaseDC(0, hScreenDC)
3738

38-
this.context = gdiplus.NewGraphicsFromHDC(this.memdc)
39+
this.context = gdiplus.NewGraphicsFromHDC(gdiplus.HDC(this.memdc))
3940
this.context.SetTextRenderingHint(gdiplus.TextRenderingHintAntiAlias)
4041
//this.context.SetSmoothingMode(gdiplus.SmoothingModeAntiAlias)
4142

0 commit comments

Comments
 (0)