hoge 画像にパスを加えるツール version 3
:追加された部分
:削除された部分
(差分が大きい場合、文字単位では表示しません)
ビットマップ画像とパスの結合 hoge
- 画像保存調べた
これでQImageに書き出せってドキュメントには書いてある
しかしViewにすべきかSceneにすべきか?
両方に同じメソッドが用意されていて引数も全く同じだ
メインがviewで作ったからviewでいいか
>QGraphicsView.render (self, QPainter painter, QRectF target = QRectF(), QRect source = QRect(), Qt.AspectRatioMode mode = Qt.KeepAspectRatio)
>QGraphicsScene.render (self, QPainter painter, QRectF target = QRectF(), QRectF source = QRectF(), Qt.AspectRatioMode mode = Qt.KeepAspectRatio)
```
qi=QImage()
self.render(qi) # <------------
qi.save(<pas>)
self.scene().addPixmap(self.pix)
の戻り値を保有しておいて
self.pix = self.scene().addPixmap(self.pix)
self.pix.boundingRect()
をレンダー領域として指定する
```
これでいいかな?
# パスの挿入修正 挿入点 p
①ポイントを6分割して5個作る t=1/6
②p-2 -> t1 p-1 -> t5 とポイントを移動してから
③p-1 の位置に t2-t4 の3ポイントを挿入
---
--> [PyQt でベクターオブジェクト作成ツールを作る #](https://mimemo.io/m/3Rx1XoR367le95E)
- 画像保存調べた
これでQImageに書き出せってドキュメントには書いてある
しかしViewにすべきかSceneにすべきか?
両方に同じメソッドが用意されていて引数も全く同じだ
メインがviewで作ったからviewでいいか
QGraphicsView.render (self, QPainter painter, QRectF target = QRectF(), QRect source = QRect(), Qt.AspectRatioMode mode = Qt.KeepAspectRatio)
QGraphicsScene.render (self, QPainter painter, QRectF target = QRectF(), QRectF source = QRectF(), Qt.AspectRatioMode mode = Qt.KeepAspectRatio)
qi=QImage()
self.render(qi) # <------------
qi.save(<pas>)
self.scene().addPixmap(self.pix)
の戻り値を保有しておいて
self.pix = self.scene().addPixmap(self.pix)
self.pix.boundingRect()
をレンダー領域として指定する
これでいいかな?
パスの挿入修正 挿入点 p
①ポイントを6分割して5個作る t=1/6
②p-2 -> t1 p-1 -> t5 とポイントを移動してから
③p-1 の位置に t2-t4 の3ポイントを挿入