Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an 'oldagg' backend pointing to kiva.agg #669

Merged
merged 2 commits into from
Mar 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions enable/null/oldagg.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# (C) Copyright 2005-2021 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in LICENSE.txt and may be redistributed only under
# the conditions described in the aforementioned license. The license
# is also available online at http://www.enthought.com/licenses/BSD.txt
#
# Thanks for using Enthought open source!
from .image import (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is similar to Rahul's question, but why do we pull from .image not .agg in these?

Because if we eventually have image point to celiagg, then oldagg effectively becomes an alias for celiagg not agg?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.agg doesn't exist. That's what .image is. It's kiva.agg. When .image points to celiagg, this module will be filled with the old contents of .image.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.agg doesn't exist.

I am still a little confused. how does the code in kiva/image.py work then as it seems to just import from .agg, see:

from .agg import GraphicsContextArray as GraphicsContext

My understanding was that image was basically just an alias pointing at agg, and it would move to point to celiagg in the future (ie those imports change to .celiagg).

If the image contents are going to eventually be moved into these oldagg modules when .image points to celiagg that makes sense. But the image contents seem to be pulling from .agg so it would make sense to me if these files effectively just copied that code over now rather than later?

I believe I am still missing something

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. We're talking past each other a little bit here. .image is very ambiguous here. Are you talking about kiva.image, enable.null.image, enable.qt4.image, or enable.wx.image? When you make a comment on the file enable.null.oldagg and use the name .image, then I'm sure you're talking about enable.null.image. I'm also sure that .agg does not exist in this context, because there is no such thing as enable.null.agg.

I guess I thought it would be simpler to just have these new oldagg modules get their imports directly from their image neighbors on the odd chance that an image module gets updated before the celiagg switchover.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahhh I see, my mistake, that makes sense now
thank you!

CompiledPath, font_metrics_provider, GraphicsContext, NativeScrollBar,
Window
)

__all__ = [
"CompiledPath", "GraphicsContext", "NativeScrollBar", "Window",
"font_metrics_provider"
]
18 changes: 18 additions & 0 deletions enable/qt4/oldagg.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# (C) Copyright 2005-2021 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in LICENSE.txt and may be redistributed only under
# the conditions described in the aforementioned license. The license
# is also available online at http://www.enthought.com/licenses/BSD.txt
#
# Thanks for using Enthought open source!
from .image import (
CompiledPath, font_metrics_provider, GraphicsContext, NativeScrollBar,
Window
)

__all__ = [
"CompiledPath", "GraphicsContext", "NativeScrollBar", "Window",
"font_metrics_provider"
]
18 changes: 18 additions & 0 deletions enable/wx/oldagg.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# (C) Copyright 2005-2021 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in LICENSE.txt and may be redistributed only under
# the conditions described in the aforementioned license. The license
# is also available online at http://www.enthought.com/licenses/BSD.txt
#
# Thanks for using Enthought open source!
from .image import (
CompiledPath, font_metrics_provider, GraphicsContext, NativeScrollBar,
Window
)

__all__ = [
"CompiledPath", "GraphicsContext", "NativeScrollBar", "Window",
"font_metrics_provider"
]
18 changes: 18 additions & 0 deletions kiva/oldagg.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# (C) Copyright 2005-2021 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in LICENSE.txt and may be redistributed only under
# the conditions described in the aforementioned license. The license
# is also available online at http://www.enthought.com/licenses/BSD.txt
#
# Thanks for using Enthought open source!
from kiva.image import (
CompiledPath, font_metrics_provider, FontType, GraphicsContext,
GraphicsContextSystem, Image
)

__all__ = [
"CompiledPath", "font_metrics_provider", "FontType", "GraphicsContext",
"GraphicsContextSystem", "Image"
]