Skip to content

Commit

Permalink
version 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiaokang2022 committed Aug 7, 2024
1 parent 9d44802 commit 475d160
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 318 deletions.
8 changes: 8 additions & 0 deletions tkintertools/three/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"""All constants for 3D"""

import platform

FONT = "Microsoft YaHei" if platform.system(
) == "Windows" else "PingFang SC" if platform.system() == "Darwin" else "Noto Sans"

SIZE = -20
12 changes: 7 additions & 5 deletions tkintertools/three/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
import tkinter
import typing

from ..core import constants, containers
import tkintertools.core.containers

from . import constants

__all__ = [
"Canvas",
Expand All @@ -26,20 +28,20 @@
]


class Canvas(containers.Canvas):
class Canvas(tkintertools.core.containers.Canvas):
"""Base class of 3D Canvas"""

def __init__(
self,
master: containers.Tk | containers.Canvas,
master: tkintertools.core.containers.Tk | tkintertools.core.containers.Canvas,
*,
expand: typing.Literal["", "x", "y", "xy"] = "xy",
zoom_item: bool = False,
keep_ratio: typing.Literal["min", "max"] | None = None,
free_anchor: bool = False,
**kwargs,
) -> None:
containers.Canvas.__init__(
tkintertools.core.containers.Canvas.__init__(
self, master, expand=expand, zoom_item=zoom_item,
keep_ratio=keep_ratio, free_anchor=free_anchor, **kwargs)
self._components: list[Component] = []
Expand Down Expand Up @@ -68,7 +70,7 @@ class Space(Canvas):

def __init__(
self,
master: containers.Tk | containers.Canvas,
master: tkintertools.core.containers.Tk | tkintertools.core.containers.Canvas,
*,
expand: typing.Literal["", "x", "y", "xy"] = "xy",
zoom_item: bool = False,
Expand Down
221 changes: 0 additions & 221 deletions tkintertools/three/engine_.py

This file was deleted.

5 changes: 2 additions & 3 deletions tkintertools/three/geometries.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Standard Geometries"""


from . import engine

__all__ = [
Expand All @@ -16,7 +15,7 @@


class Cuboid(engine.Geometry):
""""""
"""Cuboid"""

def __init__(
self,
Expand Down Expand Up @@ -64,7 +63,7 @@ def __init__(


class Tetrahedron(engine.Geometry):
""""""
"""Tetrahedron"""

def __init__(
self,
Expand Down
89 changes: 0 additions & 89 deletions tkintertools/three/mathmetica.py

This file was deleted.

0 comments on commit 475d160

Please sign in to comment.