# -*- coding: utf-8 -*-
"""
様々な図形の描画
"""

import tkinter as tk


def main():
    base = tk.Tk()
    base.title("$u_id")
    base.geometry("300x200")  # ウィンドウの大きさ

    canvas = tk.Canvas(base)
    canvas.pack()

    # 折れ線と多角形
    points1 = [ 30,  80,  80, 110, 40, 130, 80,  80]  # 角の座標列
    points2 = [120,  80, 170, 110, 150, 130]
    line1 = canvas.create_line(points1, width=4)  # 角の座標列はlistでも指定可能
    pgon1 = canvas.create_polygon(points2, outline="red", fill="green", width=2)

    # 円と弧
    oval1 = canvas.create_oval(210, 80, 280, 120, width=3, dash=(10, 3))
    arc1  = canvas.create_arc(150, 80, 30, 30, start=45, extent=120)

    # 長方形とテキスト
    rect1 = canvas.create_rectangle(200, 10, 260, 40, outline="blue", fill="yellow")
    text1 = canvas.create_text(150, 170, text="日本語もOK", font=("MS Mincho", 20))

    base.mainloop()  # GUIを待機


if __name__ == "__main__":
    main()
