Skip to content

Commit 87500f5

Browse files
committed
s/graphics.py/context.py/
1 parent d097d80 commit 87500f5

6 files changed

Lines changed: 14 additions & 14 deletions

File tree

PlotDevice.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
2ABDB7741867D9970069EFC3 /* plotdevice in Copy plotdevice tool */ = {isa = PBXBuildFile; fileRef = 2ABDB7721867D9920069EFC3 /* plotdevice */; };
5454
2ABDB7791867EB5B0069EFC3 /* app.py in Copy plotdevice.gui */ = {isa = PBXBuildFile; fileRef = 2ABDB7751867EB520069EFC3 /* app.py */; };
5555
2ABDB77A1867EB5E0069EFC3 /* views.py in Copy plotdevice.gui */ = {isa = PBXBuildFile; fileRef = 2ABDB7761867EB520069EFC3 /* views.py */; };
56-
2AC07CDA18EF8ED500B75879 /* graphics.py in Copy plotdevice root */ = {isa = PBXBuildFile; fileRef = 2AC07CD818EF8EC500B75879 /* graphics.py */; };
56+
2AC07CDA18EF8ED500B75879 /* context.py in Copy plotdevice root */ = {isa = PBXBuildFile; fileRef = 2AC07CD818EF8EC500B75879 /* context.py */; };
5757
2AC07CDB18EF8F4900B75879 /* __init__.py in Copy plotdevice.gfx */ = {isa = PBXBuildFile; fileRef = 2AC07CB618EF8E7D00B75879 /* __init__.py */; };
5858
2AC07CDC18EF8F4900B75879 /* bezier.py in Copy plotdevice.gfx */ = {isa = PBXBuildFile; fileRef = 2AC07CB818EF8E7D00B75879 /* bezier.py */; };
5959
2AC07CDD18EF8F4900B75879 /* colors.py in Copy plotdevice.gfx */ = {isa = PBXBuildFile; fileRef = 2AC07CBA18EF8E7D00B75879 /* colors.py */; };
@@ -162,7 +162,7 @@
162162
dstSubfolderSpec = 7;
163163
files = (
164164
611CC52F10BA8DDF00B55455 /* __init__.py in Copy plotdevice root */,
165-
2AC07CDA18EF8ED500B75879 /* graphics.py in Copy plotdevice root */,
165+
2AC07CDA18EF8ED500B75879 /* context.py in Copy plotdevice root */,
166166
);
167167
name = "Copy plotdevice root";
168168
runOnlyForDeploymentPostprocessing = 0;
@@ -281,7 +281,7 @@
281281
2AC07CC118EF8E7D00B75879 /* image.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = image.py; sourceTree = "<group>"; };
282282
2AC07CC318EF8E7D00B75879 /* transform.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = transform.py; sourceTree = "<group>"; };
283283
2AC07CC518EF8E7D00B75879 /* typography.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = typography.py; sourceTree = "<group>"; };
284-
2AC07CD818EF8EC500B75879 /* graphics.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = graphics.py; sourceTree = "<group>"; };
284+
2AC07CD818EF8EC500B75879 /* context.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = context.py; sourceTree = "<group>"; };
285285
2AC07CE218EF9B2400B75879 /* atoms.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = atoms.py; sourceTree = "<group>"; };
286286
2AC5187F18636C9F007FB066 /* sandbox.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = sandbox.py; sourceTree = "<group>"; };
287287
2AD0A9B6186E552700D1F6DE /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Resources/English.lproj/PlotDeviceScript.xib; sourceTree = "<group>"; };
@@ -484,7 +484,7 @@
484484
isa = PBXGroup;
485485
children = (
486486
611CC4AF10BA8C1B00B55455 /* __init__.py */,
487-
2AC07CD818EF8EC500B75879 /* graphics.py */,
487+
2AC07CD818EF8EC500B75879 /* context.py */,
488488
2AC07CB518EF8E7D00B75879 /* gfx */,
489489
2A32957118C59D0A00EEDD1C /* lib */,
490490
611CC4BA10BA8C1B00B55455 /* geo */,

plotdevice/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ class DeviceError(Exception):
3737
# if imported from an external module, set up a drawing environment in __all__.
3838
# (note that since this happens at the module level, the canvas will be shared
3939
# among all the files in a given process that `import *`).
40-
from . import graphics, gfx, util
40+
from . import context, gfx, util
4141

4242
# create a global canvas and graphics context for the draw functions to operate on
43-
context = graphics.Context()
43+
context = context.Context()
4444
ns = context._ns
4545

4646
# set up the standard plotdevice global namespace, all tied to the module-level context/canvas

plotdevice/gui/views.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
from Foundation import *
88
from AppKit import *
9-
from Quartz import CGColorCreateGenericRGB
10-
from PyObjCTools import AppHelper
11-
from plotdevice import graphics
12-
from plotdevice.run import stacktrace
9+
# from Quartz import CGColorCreateGenericRGB
10+
# from PyObjCTools import AppHelper
11+
# from plotdevice import context
12+
# from plotdevice.run import stacktrace
1313

1414
DARK_GREY = NSColor.blackColor().blendedColorWithFraction_ofColor_(0.7, NSColor.whiteColor())
1515

plotdevice/gui/widgets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def mouseExited_(self, e):
6666
self.spinner.setHidden_(False)
6767

6868

69-
from plotdevice.graphics import NUMBER, TEXT, BOOLEAN, BUTTON
69+
from plotdevice.context import NUMBER, TEXT, BOOLEAN, BUTTON
7070
SMALL_FONT = NSFont.systemFontOfSize_(NSFont.smallSystemFontSize())
7171
MINI_FONT = NSFont.systemFontOfSize_(NSFont.systemFontSizeForControlSize_(NSMiniControlSize))
7272
class DashboardController(NSObject):

plotdevice/run/sandbox.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from AppKit import *
99
from ..run import stacktrace, coredump
1010
from ..lib.io import MovieExportSession, ImageExportSession
11-
from plotdevice import util, graphics, gfx, DeviceError, __MAGIC as MAGICVAR
11+
from plotdevice import util, context, gfx, DeviceError, __MAGIC as MAGICVAR
1212

1313
__all__ = ['Sandbox']
1414

@@ -56,8 +56,8 @@ def __init__(self, delegate=None):
5656
self.magicvar = 0 # used for value ladders
5757

5858
# set up the graphics plumbing
59-
self.canvas = graphics.Canvas()
60-
self.context = graphics.Context(self.canvas, self.namespace)
59+
self.canvas = context.Canvas()
60+
self.context = context.Context(self.canvas, self.namespace)
6161
self.delegate = delegate or Delegate()
6262

6363
# create a clean env to use as a template during runs

0 commit comments

Comments
 (0)