背景が透明なPNG画像(wckee-001.png)を準備。
スクリーンショットのPNG画像の上にwckee-001.pngを重ねます。
import kivy
kivy.require ('1.11.1')
#コメントアウト必要あれば役にたつかもしれません
#import os
#os.environ['KIVY_GL_BACKEND'] = 'gl'
#from kivy.core.window import Window
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.graphics import Rectangle
class Wckee (Widget):
def __init__ (self):
super (Wckee, self).__init__ ()
self.canvas.add (Rectangle (
source='wckee-001.png' , size=(444,100),
pos=(200,300)))
class Field (Widget):
def __init__ (self):
super (Field, self).__init__ ()
self.canvas.add (Rectangle (
source='Screenshot.png' , size=(1024,768)))
wckee=Wckee()
self.add_widget(wckee)
class MyApp (App):
def build (self):
return Field ()
if __name__ == '__main__':
MyApp ().run ()
画像のアスペクト比がムチャクチャなのですが、スタンプ出来ました。
課長これオッケーなんですか~
もとい、
承認。
挫折、
学習リスク、少なめ、tkinterが、おすすめ、
https://ameblo.jp/math-physics/entry-12821097549.html








