This commit is contained in:
Graham Wheeler 2022-12-19 15:11:42 -08:00
Родитель a95fc935c6
Коммит 3ed0addb1e
69 изменённых файлов: 370 добавлений и 411 удалений

Просмотреть файл

@ -1,22 +1,36 @@
from ast import Str
from tkinter import Image
import numpy as np
from typing import Callable, Literal, Sequence
from ._typing import *
from .text import Text
from .patches import Circle
from .backend_bases import (
DrawEvent,
Event,
FigureCanvasBase,
KeyEvent,
MouseButton,
MouseEvent,
from matplotlib.axes._axes import Axes
from numpy.typing import ArrayLike
from matplotlib.widgets import Slider
from typing import (
Dict,
List,
Optional,
Tuple,
Union,
Literal,
Mapping,
Callable,
Any,
Sequence,
)
from matplotlib.backend_bases import MouseButton
from matplotlib.figure import Figure
from contextlib import ExitStack
import copy
from numbers import Integral, Number
import numpy as np
import matplotlib as mpl
from . import _api, _docstring, backend_tools, cbook, colors, ticker, transforms
from .lines import Line2D
from .figure import Figure
from .axes import Axes
from .artist import Artist
from .patches import Circle, Rectangle, Ellipse, Polygon
from .transforms import TransformedPatchPath, Affine2D
from matplotlib.lines import Line2D
from matplotlib.patches import Ellipse, Rectangle
from matplotlib.transforms import Affine2D
from numpy import float64, ndarray
class LockDraw:
def __init__(self) -> None: ...
@ -27,9 +41,9 @@ class LockDraw:
def locked(self) -> bool: ...
class Widget:
drawon = ...
eventson = ...
drawon: bool = ...
eventson: bool = ...
_active: bool = ...
def set_active(self, active: Widget): ...
def get_active(self) -> bool: ...
@ -45,10 +59,10 @@ class Button(AxesWidget):
def __init__(
self,
ax: Axes,
label: Str,
image: Image | ArrayLike = ...,
color: Color = ...,
hovercolor: Color = ...,
label: str,
image: ArrayLike | Image | None = None,
color: Color = "0.85",
hovercolor: Color = "0.95",
) -> None: ...
def on_clicked(self, func: Callable) -> int: ...
def disconnect(self, cid): ...
@ -79,8 +93,8 @@ class Slider(SliderBase):
label: str,
valmin: float,
valmax: float,
valinit: float = ...,
valfmt: str | None = ...,
valinit: float = 0.5,
valfmt: str | None = None,
closedmin: bool = True,
closedmax: bool = True,
slidermin: Slider | None = None,
@ -89,10 +103,10 @@ class Slider(SliderBase):
valstep: float | ArrayLike | None = None,
orientation: Literal["horizontal", "vertical"] = "horizontal",
*,
initcolo: Color = "r",
initcolor: Color = "r",
track_color: Color = "lightgrey",
handle_style: dict = ...,
**kwargs
handle_style: Mapping | None = None,
**kwargs,
) -> None: ...
def set_val(self, val: float) -> None: ...
def on_changed(self, func: Callable) -> int: ...
@ -107,7 +121,7 @@ class RangeSlider(SliderBase):
label: str,
valmin: float,
valmax: float,
valinit: Sequence[float] | None = None,
valinit: tuple[float, ...] | None = None,
valfmt: str | None = None,
closedmin: bool = True,
closedmax: bool = True,
@ -115,8 +129,8 @@ class RangeSlider(SliderBase):
valstep: float | None = None,
orientation: Literal["horizontal", "vertical"] = "horizontal",
track_color: Color = "lightgrey",
handle_style: dict = ...,
**kwargs
handle_style: Mapping | None = None,
**kwargs,
) -> None: ...
def set_min(self, min: float): ...
def set_max(self, max: float): ...
@ -139,11 +153,11 @@ class TextBox(AxesWidget):
self,
ax: Axes,
label: str,
initial: str = ...,
color: Color = ...,
hovercolor: Color = ...,
label_pad: float = ...,
textalignment: Literal["left", "center", "right"] = ...,
initial: str = "",
color: Color = ".95",
hovercolor: Color = "1",
label_pad: float = 0.01,
textalignment: Literal["left", "center", "right"] = "left",
) -> None: ...
@property
def text(self) -> str: ...
@ -167,8 +181,8 @@ class RadioButtons(AxesWidget):
self,
ax: Axes,
labels: Sequence[Text],
active: int = ...,
activecolor: Color = ...,
active: int = 0,
activecolor: Color = "blue",
) -> None: ...
def set_active(self, index: int): ...
def on_clicked(self, func: Callable) -> int: ...
@ -209,11 +223,11 @@ class _SelectorWidget(AxesWidget):
self,
ax: Axes,
onselect: Callable,
useblit: bool = ...,
button=...,
state_modifier_keys=...,
use_data_coordinates=...,
) -> None: ...
useblit: bool = False,
button=None,
state_modifier_keys=None,
use_data_coordinates=False,
): ...
eventpress = ...
eventrelease = ...
@ -249,17 +263,17 @@ class SpanSelector(_SelectorWidget):
direction: Literal["horizontal", "vertical"],
minspan: float = 0,
useblit: bool = False,
props: dict = ...,
onmove_callback: Callable = ...,
props: Mapping | None = None,
onmove_callback: Callable[[float, float]] | None = None,
interactive: bool = False,
button: MouseButton | Sequence[MouseButton] = ...,
handle_props: dict = ...,
button: MouseButton | Sequence[MouseButton] | None = None,
handle_props: Mapping | None = None,
grab_range: float = 10,
state_modifier_keys: dict = ...,
state_modifier_keys: Mapping | None = None,
drag_from_anywhere: bool = False,
ignore_event_outside: bool = False,
snap_values: ArrayLike = ...,
) -> None: ...
snap_values: ArrayLike | None = None,
): ...
rect = ...
rectprops = ...
@ -284,7 +298,7 @@ class ToolLineHandles:
ax: Axes,
positions: ArrayLike,
direction: Literal["horizontal", "vertical"],
line_props: dict = ...,
line_props: Mapping | None = None,
useblit: bool = True,
) -> None: ...
@property
@ -306,7 +320,7 @@ class ToolHandles:
x: ArrayLike,
y: ArrayLike,
marker: str = "o",
marker_props: dict = ...,
marker_props: Mapping | None = None,
useblit: bool = True,
) -> None: ...
@property
@ -314,8 +328,12 @@ class ToolHandles:
@property
def y(self): ...
@property
def artists(self) -> tuple[Line2D, ...]: ...
def set_data(self, pts: Sequence[float], y: Sequence[float] = ...) -> None: ...
def artists(self) -> tuple[Line2D]: ...
def set_data(
self,
pts: tuple[float, float, float],
y: tuple[float, float, float]|None = None,
) -> None: ...
def set_visible(self, val): ...
def set_animated(self, val): ...
def closest(self, x: float, y: float) -> tuple[int, float]: ...
@ -325,22 +343,22 @@ class RectangleSelector(_SelectorWidget):
self,
ax: Axes,
onselect: Callable,
drawtype=...,
minspanx=...,
minspany=...,
useblit=...,
lineprops=...,
props=...,
spancoords=...,
button=...,
grab_range=...,
handle_props=...,
interactive=...,
state_modifier_keys=...,
drag_from_anywhere=...,
ignore_event_outside=...,
use_data_coordinates=...,
) -> None: ...
drawtype="box",
minspanx: float = 0,
minspany: float = 0,
useblit: bool = False,
lineprops=None,
props: Mapping | None = None,
spancoords: Literal["data", "pixels"] = "data",
button: MouseButton | Sequence[MouseButton] | None = None,
grab_range: float = 10,
handle_props: Mapping | None = None,
interactive: bool = False,
state_modifier_keys: Mapping | None = None,
drag_from_anywhere: bool = False,
ignore_event_outside: bool = False,
use_data_coordinates: bool = False,
): ...
to_draw = ...
drawtype = ...
@ -348,9 +366,9 @@ class RectangleSelector(_SelectorWidget):
interactive = ...
maxdist = ...
@property
def corners(self): ...
def corners(self) -> tuple[ndarray, ndarray]: ...
@property
def edge_centers(self): ...
def edge_centers(self) -> tuple[ndarray, ndarray]: ...
@property
def center(self) -> tuple[float, float]: ...
@property
@ -374,11 +392,12 @@ class LassoSelector(_SelectorWidget):
def __init__(
self,
ax: Axes,
onselect: Callable = ...,
onselect: Callable | None = None,
useblit: bool = True,
props: dict = ...,
button: MouseButton | Sequence[MouseButton] = ...,
) -> None: ...
props: Mapping | None = None,
button: MouseButton | Sequence[MouseButton] | None = None,
): ...
@_api.deprecated("3.5", alternative="press")
def onpress(self, event): ...
def onrelease(self, event): ...
@ -387,15 +406,16 @@ class PolygonSelector(_SelectorWidget):
self,
ax: Axes,
onselect: Callable,
useblit: bool = True,
props: dict = ...,
handle_props: dict = ...,
useblit: bool = False,
props: Mapping | None = None,
handle_props: Mapping | None = None,
grab_range: float = 10,
*,
draw_bounding_box: bool = ...,
box_handle_props: dict = ...,
box_props: dict = ...
) -> None: ...
draw_bounding_box: bool = False,
box_handle_props: Mapping | None = None,
box_props: Mapping | None = None,
): ...
line = ...
vertex_select_radius = ...
@ -409,8 +429,8 @@ class Lasso(AxesWidget):
def __init__(
self,
ax: Axes,
xy: Sequence[float],
callback: Callable = ...,
xy: tuple[float, float],
callback: Callable | None = None,
useblit: bool = True,
) -> None: ...
def onrelease(self, event: MouseEvent) -> None: ...

Просмотреть файл

@ -1,12 +1,10 @@
from typing import Literal, Sequence
from vispy.color.color_array import ColorArray
from ..color.color_array import ColorArray
# -*- coding: utf-8 -*-
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division # just to be safe...
import numpy as np
from copy import deepcopy

Просмотреть файл

@ -2,8 +2,6 @@
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division # just to be safe...
import numpy as np
###############################################################################

Просмотреть файл

@ -1,5 +1,5 @@
from vispy.color.colormap import Colormap
from vispy._typing import Scalar
from ..color.colormap import Colormap
from .._typing import Scalar
from numpy.typing import NDArray, ArrayLike
from typing import Sequence
@ -7,14 +7,12 @@ from typing import Sequence
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division # just to be safe...
import warnings
import numpy as np
from .color_array import ColorArray
from ..ext.cubehelix import cubehelix
from hsluv import hsluv_to_rgb
from ..util.check_environment import has_matplotlib
import vispy.gloo

Просмотреть файл

@ -102,218 +102,218 @@ __i386__ = ...
objc = ...
objc.class_addIvar.restype = ...
objc.class_addIvar.argtypes: list = ...
objc.class_addIvar.argtypes= ...
objc.class_addMethod.restype = ...
objc.class_addProtocol.restype = ...
objc.class_addProtocol.argtypes: list = ...
objc.class_addProtocol.argtypes= ...
objc.class_conformsToProtocol.restype = ...
objc.class_conformsToProtocol.argtypes: list = ...
objc.class_conformsToProtocol.argtypes= ...
objc.class_copyIvarList.restype = ...
objc.class_copyIvarList.argtypes: list = ...
objc.class_copyIvarList.argtypes= ...
objc.class_copyMethodList.restype = ...
objc.class_copyMethodList.argtypes: list = ...
objc.class_copyMethodList.argtypes= ...
objc.class_copyPropertyList.restype = ...
objc.class_copyPropertyList.argtypes: list = ...
objc.class_copyPropertyList.argtypes= ...
objc.class_copyProtocolList.restype = ...
objc.class_copyProtocolList.argtypes: list = ...
objc.class_copyProtocolList.argtypes= ...
objc.class_createInstance.restype = ...
objc.class_createInstance.argtypes: list = ...
objc.class_createInstance.argtypes= ...
objc.class_getClassMethod.restype = ...
objc.class_getClassMethod.argtypes: list = ...
objc.class_getClassMethod.argtypes= ...
objc.class_getClassVariable.restype = ...
objc.class_getClassVariable.argtypes: list = ...
objc.class_getClassVariable.argtypes= ...
objc.class_getInstanceMethod.restype = ...
objc.class_getInstanceMethod.argtypes: list = ...
objc.class_getInstanceMethod.argtypes= ...
objc.class_getInstanceSize.restype = ...
objc.class_getInstanceSize.argtypes: list = ...
objc.class_getInstanceSize.argtypes= ...
objc.class_getInstanceVariable.restype = ...
objc.class_getInstanceVariable.argtypes: list = ...
objc.class_getInstanceVariable.argtypes= ...
objc.class_getIvarLayout.restype = ...
objc.class_getIvarLayout.argtypes: list = ...
objc.class_getIvarLayout.argtypes= ...
objc.class_getMethodImplementation.restype = ...
objc.class_getMethodImplementation.argtypes: list = ...
objc.class_getMethodImplementation.argtypes= ...
objc.class_getName.restype = ...
objc.class_getName.argtypes: list = ...
objc.class_getName.argtypes= ...
objc.class_getProperty.restype = ...
objc.class_getProperty.argtypes: list = ...
objc.class_getProperty.argtypes= ...
objc.class_getSuperclass.restype = ...
objc.class_getSuperclass.argtypes: list = ...
objc.class_getSuperclass.argtypes= ...
objc.class_getVersion.restype = ...
objc.class_getVersion.argtypes: list = ...
objc.class_getVersion.argtypes= ...
objc.class_getWeakIvarLayout.restype = ...
objc.class_getWeakIvarLayout.argtypes: list = ...
objc.class_getWeakIvarLayout.argtypes= ...
objc.class_isMetaClass.restype = ...
objc.class_isMetaClass.argtypes: list = ...
objc.class_isMetaClass.argtypes= ...
objc.class_replaceMethod.restype = ...
objc.class_replaceMethod.argtypes: list = ...
objc.class_replaceMethod.argtypes= ...
objc.class_respondsToSelector.restype = ...
objc.class_respondsToSelector.argtypes: list = ...
objc.class_respondsToSelector.argtypes= ...
objc.class_setIvarLayout.restype: None = ...
objc.class_setIvarLayout.argtypes: list = ...
objc.class_setIvarLayout.restype = ...
objc.class_setIvarLayout.argtypes= ...
objc.class_setSuperclass.restype = ...
objc.class_setSuperclass.argtypes: list = ...
objc.class_setSuperclass.argtypes= ...
objc.class_setVersion.restype: None = ...
objc.class_setVersion.argtypes: list = ...
objc.class_setVersion.restype = ...
objc.class_setVersion.argtypes= ...
objc.class_setWeakIvarLayout.restype: None = ...
objc.class_setWeakIvarLayout.argtypes: list = ...
objc.class_setWeakIvarLayout.restype = ...
objc.class_setWeakIvarLayout.argtypes= ...
objc.ivar_getName.restype = ...
objc.ivar_getName.argtypes: list = ...
objc.ivar_getName.argtypes= ...
objc.ivar_getOffset.restype = ...
objc.ivar_getOffset.argtypes: list = ...
objc.ivar_getOffset.argtypes= ...
objc.ivar_getTypeEncoding.restype = ...
objc.ivar_getTypeEncoding.argtypes: list = ...
objc.ivar_getTypeEncoding.argtypes= ...
objc.method_copyArgumentType.restype = ...
objc.method_copyArgumentType.argtypes: list = ...
objc.method_copyArgumentType.argtypes= ...
objc.method_copyReturnType.restype = ...
objc.method_copyReturnType.argtypes: list = ...
objc.method_copyReturnType.argtypes= ...
objc.method_exchangeImplementations.restype: None = ...
objc.method_exchangeImplementations.argtypes: list = ...
objc.method_exchangeImplementations.restype = ...
objc.method_exchangeImplementations.argtypes= ...
objc.method_getArgumentType.restype: None = ...
objc.method_getArgumentType.argtypes: list = ...
objc.method_getArgumentType.restype = ...
objc.method_getArgumentType.argtypes= ...
objc.method_getImplementation.restype = ...
objc.method_getImplementation.argtypes: list = ...
objc.method_getImplementation.argtypes= ...
objc.method_getName.restype = ...
objc.method_getName.argtypes: list = ...
objc.method_getName.argtypes= ...
objc.method_getNumberOfArguments.restype = ...
objc.method_getNumberOfArguments.argtypes: list = ...
objc.method_getNumberOfArguments.argtypes= ...
objc.method_getReturnType.restype: None = ...
objc.method_getReturnType.argtypes: list = ...
objc.method_getReturnType.restype = ...
objc.method_getReturnType.argtypes= ...
objc.method_getTypeEncoding.restype = ...
objc.method_getTypeEncoding.argtypes: list = ...
objc.method_getTypeEncoding.argtypes= ...
objc.method_setImplementation.restype = ...
objc.method_setImplementation.argtypes: list = ...
objc.method_setImplementation.argtypes= ...
objc.objc_allocateClassPair.restype = ...
objc.objc_allocateClassPair.argtypes: list = ...
objc.objc_allocateClassPair.argtypes= ...
objc.objc_copyProtocolList.restype = ...
objc.objc_copyProtocolList.argtypes: list = ...
objc.objc_copyProtocolList.argtypes= ...
objc.objc_getAssociatedObject.restype = ...
objc.objc_getAssociatedObject.argtypes: list = ...
objc.objc_getAssociatedObject.argtypes= ...
objc.objc_getClass.restype = ...
objc.objc_getClass.argtypes: list = ...
objc.objc_getClass.argtypes= ...
objc.objc_getClassList.restype = ...
objc.objc_getClassList.argtypes: list = ...
objc.objc_getClassList.argtypes= ...
objc.objc_getMetaClass.restype = ...
objc.objc_getMetaClass.argtypes: list = ...
objc.objc_getMetaClass.argtypes= ...
objc.objc_getProtocol.restype = ...
objc.objc_getProtocol.argtypes: list = ...
objc.objc_getProtocol.argtypes= ...
objc.objc_registerClassPair.restype: None = ...
objc.objc_registerClassPair.argtypes: list = ...
objc.objc_registerClassPair.restype = ...
objc.objc_registerClassPair.argtypes= ...
objc.objc_removeAssociatedObjects.restype: None = ...
objc.objc_removeAssociatedObjects.argtypes: list = ...
objc.objc_removeAssociatedObjects.restype = ...
objc.objc_removeAssociatedObjects.argtypes= ...
objc.objc_setAssociatedObject.restype: None = ...
objc.objc_setAssociatedObject.argtypes: list = ...
objc.objc_setAssociatedObject.restype = ...
objc.objc_setAssociatedObject.argtypes= ...
objc.object_copy.restype = ...
objc.object_copy.argtypes: list = ...
objc.object_copy.argtypes= ...
objc.object_dispose.restype = ...
objc.object_dispose.argtypes: list = ...
objc.object_dispose.argtypes= ...
objc.object_getClass.restype = ...
objc.object_getClass.argtypes: list = ...
objc.object_getClass.argtypes= ...
objc.object_getClassName.restype = ...
objc.object_getClassName.argtypes: list = ...
objc.object_getClassName.argtypes= ...
objc.object_getInstanceVariable.restype = ...
objc.object_getInstanceVariable.argtypes: list = ...
objc.object_getInstanceVariable.argtypes= ...
objc.object_getIvar.restype = ...
objc.object_getIvar.argtypes: list = ...
objc.object_getIvar.argtypes= ...
objc.object_setClass.restype = ...
objc.object_setClass.argtypes: list = ...
objc.object_setClass.argtypes= ...
objc.object_setInstanceVariable.restype = ...
objc.object_setIvar.restype: None = ...
objc.object_setIvar.argtypes: list = ...
objc.object_setIvar.restype = ...
objc.object_setIvar.argtypes= ...
objc.property_getAttributes.restype = ...
objc.property_getAttributes.argtypes: list = ...
objc.property_getAttributes.argtypes= ...
objc.property_getName.restype = ...
objc.property_getName.argtypes: list = ...
objc.property_getName.argtypes= ...
objc.protocol_conformsToProtocol.restype = ...
objc.protocol_conformsToProtocol.argtypes: list = ...
objc.protocol_conformsToProtocol.argtypes= ...
class OBJC_METHOD_DESCRIPTION(Structure):
_fields_: list = ...
_fields_= ...
objc.protocol_copyMethodDescriptionList.restype = ...
objc.protocol_copyMethodDescriptionList.argtypes: list = ...
objc.protocol_copyMethodDescriptionList.argtypes= ...
objc.protocol_copyPropertyList.restype = ...
objc.protocol_copyPropertyList.argtypes: list = ...
objc.protocol_copyPropertyList.argtypes= ...
objc.protocol_copyProtocolList = ...
objc.protocol_copyProtocolList.argtypes: list = ...
objc.protocol_copyProtocolList.argtypes= ...
objc.protocol_getMethodDescription.restype = OBJC_METHOD_DESCRIPTION
objc.protocol_getMethodDescription.argtypes: list = ...
objc.protocol_getMethodDescription.argtypes= ...
objc.protocol_getName.restype = ...
objc.protocol_getName.argtypes: list = ...
objc.protocol_getName.argtypes= ...
objc.sel_getName.restype = ...
objc.sel_getName.argtypes: list = ...
objc.sel_getName.argtypes= ...
objc.sel_isEqual.restype = ...
objc.sel_isEqual.argtypes: list = ...
objc.sel_isEqual.argtypes= ...
objc.sel_registerName.restype = ...
objc.sel_registerName.argtypes: list = ...
objc.sel_registerName.argtypes = ...
def ensure_bytes(x): ...
def get_selector(name): ...
@ -431,65 +431,65 @@ CFAllocatorRef = ...
CFStringEncoding = ...
cf.CFStringCreateWithCString.restype = ...
cf.CFStringCreateWithCString.argtypes: list = ...
cf.CFStringCreateWithCString.argtypes= ...
cf.CFRelease.restype = ...
cf.CFRelease.argtypes: list = ...
cf.CFRelease.argtypes= ...
cf.CFStringGetLength.restype = ...
cf.CFStringGetLength.argtypes: list = ...
cf.CFStringGetLength.argtypes= ...
cf.CFStringGetMaximumSizeForEncoding.restype = ...
cf.CFStringGetMaximumSizeForEncoding.argtypes: list = ...
cf.CFStringGetMaximumSizeForEncoding.argtypes= ...
cf.CFStringGetCString.restype = ...
cf.CFStringGetCString.argtypes: list = ...
cf.CFStringGetCString.argtypes= ...
cf.CFStringGetTypeID.restype = ...
cf.CFStringGetTypeID.argtypes: list = ...
cf.CFStringGetTypeID.argtypes= ...
cf.CFAttributedStringCreate.restype = ...
cf.CFAttributedStringCreate.argtypes: list = ...
cf.CFAttributedStringCreate.argtypes= ...
cf.CFURLCreateWithFileSystemPath.restype = ...
cf.CFURLCreateWithFileSystemPath.argtypes: list = ...
cf.CFURLCreateWithFileSystemPath.argtypes= ...
def CFSTR(string): ...
def get_NSString(string): ...
def cfstring_to_string(cfstring): ...
cf.CFDataCreate.restype = ...
cf.CFDataCreate.argtypes: list = ...
cf.CFDataCreate.argtypes= ...
cf.CFDataGetBytes.restype: None = ...
cf.CFDataGetBytes.argtypes: list = ...
cf.CFDataGetBytes.restype = ...
cf.CFDataGetBytes.argtypes= ...
cf.CFDataGetLength.restype = ...
cf.CFDataGetLength.argtypes: list = ...
cf.CFDataGetLength.argtypes= ...
cf.CFDictionaryGetValue.restype = ...
cf.CFDictionaryGetValue.argtypes: list = ...
cf.CFDictionaryGetValue.argtypes= ...
cf.CFDictionaryAddValue.restype: None = ...
cf.CFDictionaryAddValue.argtypes: list = ...
cf.CFDictionaryAddValue.restype = ...
cf.CFDictionaryAddValue.argtypes= ...
cf.CFDictionaryCreateMutable.restype = ...
cf.CFDictionaryCreateMutable.argtypes: list = ...
cf.CFDictionaryCreateMutable.argtypes= ...
cf.CFNumberCreate.restype = ...
cf.CFNumberCreate.argtypes: list = ...
cf.CFNumberCreate.argtypes= ...
cf.CFNumberGetType.restype = ...
cf.CFNumberGetType.argtypes: list = ...
cf.CFNumberGetType.argtypes= ...
cf.CFNumberGetValue.restype = ...
cf.CFNumberGetValue.argtypes: list = ...
cf.CFNumberGetValue.argtypes= ...
cf.CFNumberGetTypeID.restype = ...
cf.CFNumberGetTypeID.argtypes: list = ...
cf.CFNumberGetTypeID.argtypes= ...
cf.CFGetTypeID.restype = ...
cf.CFGetTypeID.argtypes: list = ...
cf.CFGetTypeID.argtypes= ...
# CFNumber.h
kCFNumberSInt8Type: int = ...
@ -518,33 +518,33 @@ known_cftypes: dict = ...
def cftype_to_value(cftype): ...
cf.CFSetGetCount.restype = ...
cf.CFSetGetCount.argtypes: list = ...
cf.CFSetGetCount.argtypes= ...
cf.CFSetGetValues.restype: None = ...
cf.CFSetGetValues.restype = ...
# PyPy 1.7 is fine with 2nd arg as POINTER(c_void_p),
# but CPython ctypes 1.1.0 complains, so just use c_void_p.
cf.CFSetGetValues.argtypes: list = ...
cf.CFSetGetValues.argtypes= ...
def cfset_to_set(cfset): ...
cf.CFArrayGetCount.restype = ...
cf.CFArrayGetCount.argtypes: list = ...
cf.CFArrayGetCount.argtypes= ...
cf.CFArrayGetValueAtIndex.restype = ...
cf.CFArrayGetValueAtIndex.argtypes: list = ...
cf.CFArrayGetValueAtIndex.argtypes= ...
def cfarray_to_list(cfarray): ...
kCFRunLoopDefaultMode = ...
cf.CFRunLoopGetCurrent.restype = ...
cf.CFRunLoopGetCurrent.argtypes: list = ...
cf.CFRunLoopGetCurrent.argtypes= ...
cf.CFRunLoopGetMain.restype = ...
cf.CFRunLoopGetMain.argtypes: list = ...
cf.CFRunLoopGetMain.argtypes= ...
cf.CFShow.restype: None = ...
cf.CFShow.argtypes: list = ...
cf.CFShow.restype = ...
cf.CFShow.argtypes= ...
######################################################################
@ -705,146 +705,146 @@ kCGImagePropertyGIFDelayTime = ...
kCGRenderingIntentDefault: int = ...
quartz.CGDisplayIDToOpenGLDisplayMask.restype = ...
quartz.CGDisplayIDToOpenGLDisplayMask.argtypes: list = ...
quartz.CGDisplayIDToOpenGLDisplayMask.argtypes= ...
quartz.CGMainDisplayID.restype = ...
quartz.CGMainDisplayID.argtypes: list = ...
quartz.CGMainDisplayID.argtypes= ...
quartz.CGShieldingWindowLevel.restype = ...
quartz.CGShieldingWindowLevel.argtypes: list = ...
quartz.CGShieldingWindowLevel.argtypes= ...
quartz.CGCursorIsVisible.restype = ...
quartz.CGDisplayCopyAllDisplayModes.restype = ...
quartz.CGDisplayCopyAllDisplayModes.argtypes: list = ...
quartz.CGDisplayCopyAllDisplayModes.argtypes= ...
quartz.CGDisplaySetDisplayMode.restype = ...
quartz.CGDisplaySetDisplayMode.argtypes: list = ...
quartz.CGDisplaySetDisplayMode.argtypes= ...
quartz.CGDisplayCapture.restype = ...
quartz.CGDisplayCapture.argtypes: list = ...
quartz.CGDisplayCapture.argtypes= ...
quartz.CGDisplayRelease.restype = ...
quartz.CGDisplayRelease.argtypes: list = ...
quartz.CGDisplayRelease.argtypes= ...
quartz.CGDisplayCopyDisplayMode.restype = ...
quartz.CGDisplayCopyDisplayMode.argtypes: list = ...
quartz.CGDisplayCopyDisplayMode.argtypes= ...
quartz.CGDisplayModeGetRefreshRate.restype = ...
quartz.CGDisplayModeGetRefreshRate.argtypes: list = ...
quartz.CGDisplayModeGetRefreshRate.argtypes= ...
quartz.CGDisplayModeRetain.restype = ...
quartz.CGDisplayModeRetain.argtypes: list = ...
quartz.CGDisplayModeRetain.argtypes= ...
quartz.CGDisplayModeRelease.restype: None = ...
quartz.CGDisplayModeRelease.argtypes: list = ...
quartz.CGDisplayModeRelease.restype = ...
quartz.CGDisplayModeRelease.argtypes= ...
quartz.CGDisplayModeGetWidth.restype = ...
quartz.CGDisplayModeGetWidth.argtypes: list = ...
quartz.CGDisplayModeGetWidth.argtypes= ...
quartz.CGDisplayModeGetHeight.restype = ...
quartz.CGDisplayModeGetHeight.argtypes: list = ...
quartz.CGDisplayModeGetHeight.argtypes= ...
quartz.CGDisplayModeCopyPixelEncoding.restype = ...
quartz.CGDisplayModeCopyPixelEncoding.argtypes: list = ...
quartz.CGDisplayModeCopyPixelEncoding.argtypes= ...
quartz.CGGetActiveDisplayList.restype = ...
quartz.CGGetActiveDisplayList.argtypes: list = ...
quartz.CGGetActiveDisplayList.argtypes= ...
quartz.CGDisplayBounds.restype = ...
quartz.CGDisplayBounds.argtypes: list = ...
quartz.CGDisplayBounds.argtypes= ...
quartz.CGImageSourceCreateWithData.restype = ...
quartz.CGImageSourceCreateWithData.argtypes: list = ...
quartz.CGImageSourceCreateWithData.argtypes= ...
quartz.CGImageSourceCreateImageAtIndex.restype = ...
quartz.CGImageSourceCreateImageAtIndex.argtypes: list = ...
quartz.CGImageSourceCreateImageAtIndex.argtypes= ...
quartz.CGImageSourceCopyPropertiesAtIndex.restype = ...
quartz.CGImageSourceCopyPropertiesAtIndex.argtypes: list = ...
quartz.CGImageSourceCopyPropertiesAtIndex.argtypes= ...
quartz.CGImageGetDataProvider.restype = ...
quartz.CGImageGetDataProvider.argtypes: list = ...
quartz.CGImageGetDataProvider.argtypes= ...
quartz.CGDataProviderCopyData.restype = ...
quartz.CGDataProviderCopyData.argtypes: list = ...
quartz.CGDataProviderCopyData.argtypes= ...
quartz.CGDataProviderCreateWithCFData.restype = ...
quartz.CGDataProviderCreateWithCFData.argtypes: list = ...
quartz.CGDataProviderCreateWithCFData.argtypes= ...
quartz.CGImageCreate.restype = ...
quartz.CGImageCreate.argtypes: list = ...
quartz.CGImageCreate.argtypes= ...
quartz.CGImageRelease.restype: None = ...
quartz.CGImageRelease.argtypes: list = ...
quartz.CGImageRelease.restype = ...
quartz.CGImageRelease.argtypes= ...
quartz.CGImageGetBytesPerRow.restype = ...
quartz.CGImageGetBytesPerRow.argtypes: list = ...
quartz.CGImageGetBytesPerRow.argtypes= ...
quartz.CGImageGetWidth.restype = ...
quartz.CGImageGetWidth.argtypes: list = ...
quartz.CGImageGetWidth.argtypes= ...
quartz.CGImageGetHeight.restype = ...
quartz.CGImageGetHeight.argtypes: list = ...
quartz.CGImageGetHeight.argtypes= ...
quartz.CGImageGetBitsPerPixel.restype = ...
quartz.CGImageGetBitsPerPixel.argtypes: list = ...
quartz.CGImageGetBitsPerPixel.argtypes= ...
quartz.CGImageGetBitmapInfo.restype = ...
quartz.CGImageGetBitmapInfo.argtypes: list = ...
quartz.CGImageGetBitmapInfo.argtypes= ...
quartz.CGColorSpaceCreateDeviceRGB.restype = ...
quartz.CGColorSpaceCreateDeviceRGB.argtypes: list = ...
quartz.CGColorSpaceCreateDeviceRGB.argtypes= ...
quartz.CGDataProviderRelease.restype: None = ...
quartz.CGDataProviderRelease.argtypes: list = ...
quartz.CGDataProviderRelease.restype = ...
quartz.CGDataProviderRelease.argtypes= ...
quartz.CGColorSpaceRelease.restype: None = ...
quartz.CGColorSpaceRelease.argtypes: list = ...
quartz.CGColorSpaceRelease.restype = ...
quartz.CGColorSpaceRelease.argtypes= ...
quartz.CGWarpMouseCursorPosition.restype = ...
quartz.CGWarpMouseCursorPosition.argtypes: list = ...
quartz.CGWarpMouseCursorPosition.argtypes= ...
quartz.CGDisplayMoveCursorToPoint.restype = ...
quartz.CGDisplayMoveCursorToPoint.argtypes: list = ...
quartz.CGDisplayMoveCursorToPoint.argtypes= ...
quartz.CGAssociateMouseAndMouseCursorPosition.restype = ...
quartz.CGAssociateMouseAndMouseCursorPosition.argtypes: list = ...
quartz.CGAssociateMouseAndMouseCursorPosition.argtypes= ...
quartz.CGBitmapContextCreate.restype = ...
quartz.CGBitmapContextCreate.argtypes: list = ...
quartz.CGBitmapContextCreate.argtypes= ...
quartz.CGBitmapContextCreateImage.restype = ...
quartz.CGBitmapContextCreateImage.argtypes: list = ...
quartz.CGBitmapContextCreateImage.argtypes= ...
quartz.CGFontCreateWithDataProvider.restype = ...
quartz.CGFontCreateWithDataProvider.argtypes: list = ...
quartz.CGFontCreateWithDataProvider.argtypes= ...
quartz.CGFontCreateWithFontName.restype = ...
quartz.CGFontCreateWithFontName.argtypes: list = ...
quartz.CGFontCreateWithFontName.argtypes= ...
quartz.CGContextDrawImage.restype: None = ...
quartz.CGContextDrawImage.argtypes: list = ...
quartz.CGContextDrawImage.restype = ...
quartz.CGContextDrawImage.argtypes= ...
quartz.CGContextRelease.restype: None = ...
quartz.CGContextRelease.argtypes: list = ...
quartz.CGContextRelease.restype = ...
quartz.CGContextRelease.argtypes= ...
quartz.CGContextSetTextPosition.restype: None = ...
quartz.CGContextSetTextPosition.argtypes: list = ...
quartz.CGContextSetTextPosition.restype = ...
quartz.CGContextSetTextPosition.argtypes= ...
quartz.CGContextSetShouldAntialias.restype: None = ...
quartz.CGContextSetShouldAntialias.argtypes: list = ...
quartz.CGContextSetShouldAntialias.restype = ...
quartz.CGContextSetShouldAntialias.argtypes= ...
quartz.CGDataProviderCreateWithURL.restype = ...
quartz.CGDataProviderCreateWithURL.argtypes: list = ...
quartz.CGDataProviderCreateWithURL.argtypes= ...
quartz.CGFontCreateWithDataProvider.restype = ...
quartz.CGFontCreateWithDataProvider.argtypes: list = ...
quartz.CGFontCreateWithDataProvider.argtypes= ...
quartz.CGDisplayScreenSize.argtypes: list = ...
quartz.CGDisplayScreenSize.argtypes= ...
quartz.CGDisplayScreenSize.restype = ...
quartz.CGDisplayBounds.argtypes: list = ...
quartz.CGDisplayBounds.argtypes= ...
quartz.CGDisplayBounds.restype = ...
######################################################################
@ -868,58 +868,58 @@ kCTFontItalicTrait = ...
kCTFontBoldTrait = ...
ct.CTLineCreateWithAttributedString.restype = ...
ct.CTLineCreateWithAttributedString.argtypes: list = ...
ct.CTLineCreateWithAttributedString.argtypes= ...
ct.CTLineDraw.restype: None = ...
ct.CTLineDraw.argtypes: list = ...
ct.CTLineDraw.restype = ...
ct.CTLineDraw.argtypes= ...
ct.CTFontGetBoundingRectsForGlyphs.restype = ...
ct.CTFontGetBoundingRectsForGlyphs.argtypes: list = ...
ct.CTFontGetBoundingRectsForGlyphs.argtypes= ...
ct.CTFontGetAdvancesForGlyphs.restype = ...
ct.CTFontGetAdvancesForGlyphs.argtypes: list = ...
ct.CTFontGetAdvancesForGlyphs.argtypes= ...
ct.CTFontGetAscent.restype = ...
ct.CTFontGetAscent.argtypes: list = ...
ct.CTFontGetAscent.argtypes= ...
ct.CTFontGetDescent.restype = ...
ct.CTFontGetDescent.argtypes: list = ...
ct.CTFontGetDescent.argtypes= ...
ct.CTFontGetSymbolicTraits.restype = ...
ct.CTFontGetSymbolicTraits.argtypes: list = ...
ct.CTFontGetSymbolicTraits.argtypes= ...
ct.CTFontGetGlyphsForCharacters.restype = ...
ct.CTFontGetGlyphsForCharacters.argtypes: list = ...
ct.CTFontGetGlyphsForCharacters.argtypes= ...
ct.CTFontCreateWithGraphicsFont.restype = ...
ct.CTFontCreateWithGraphicsFont.argtypes: list = ...
ct.CTFontCreateWithGraphicsFont.argtypes= ...
ct.CTFontCopyFamilyName.restype = ...
ct.CTFontCopyFamilyName.argtypes: list = ...
ct.CTFontCopyFamilyName.argtypes= ...
ct.CTFontCopyFullName.restype = ...
ct.CTFontCopyFullName.argtypes: list = ...
ct.CTFontCopyFullName.argtypes= ...
ct.CTFontCreateWithFontDescriptor.restype = ...
ct.CTFontCreateWithFontDescriptor.argtypes: list = ...
ct.CTFontCreateWithFontDescriptor.argtypes= ...
ct.CTFontCreateCopyWithAttributes.restype = ...
ct.CTFontCreateCopyWithAttributes.argtypes: list = ...
ct.CTFontCreateCopyWithAttributes.argtypes= ...
ct.CTFontDescriptorCreateWithAttributes.restype = ...
ct.CTFontDescriptorCreateWithAttributes.argtypes: list = ...
ct.CTFontDescriptorCreateWithAttributes.argtypes= ...
ct.CTTypesetterCreateWithAttributedString.restype = ...
ct.CTTypesetterCreateWithAttributedString.argtypes: list = ...
ct.CTTypesetterCreateWithAttributedString.argtypes= ...
ct.CTTypesetterCreateLine.restype = ...
ct.CTTypesetterCreateLine.argtypes: list = ...
ct.CTTypesetterCreateLine.argtypes= ...
ct.CTLineGetOffsetForStringIndex.restype = ...
ct.CTLineGetOffsetForStringIndex.argtypes: list = ...
ct.CTLineGetOffsetForStringIndex.argtypes= ...
ct.CTFontManagerCreateFontDescriptorsFromURL.restype = ...
ct.CTFontManagerCreateFontDescriptorsFromURL.argtypes: list = ...
ct.CTFontManagerCreateFontDescriptorsFromURL.argtypes= ...
######################################################################

Просмотреть файл

@ -1,5 +1,5 @@
from np import ndarray
from vispy._typing import Scalar
from numpy import ndarray
from .._typing import Scalar
# -*- coding: utf-8 -*-

Просмотреть файл

@ -2,8 +2,6 @@
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division as division
__all__ = [
"MeshData",
"PolygonData",

Просмотреть файл

@ -1,4 +1,4 @@
from vispy.geometry.meshdata import MeshData
from ..geometry.meshdata import MeshData
from numpy.typing import ArrayLike, NDArray
# -*- coding: utf-8 -*-
@ -9,7 +9,7 @@ from numpy.typing import ArrayLike, NDArray
# Author: Nicolas P .Rougier
# Date: 04/03/2014
# -----------------------------------------------------------------------------
from __future__ import division
import numpy as np

Просмотреть файл

@ -6,8 +6,6 @@ from numpy.typing import NDArray
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -----------------------------------------------------------------------------
from __future__ import division
import numpy as np
def isocurve(

Просмотреть файл

@ -2,7 +2,6 @@ from numpy.typing import ArrayLike
# -*- coding: utf-8 -*-
from __future__ import division, print_function
from itertools import permutations
import numpy as np

Просмотреть файл

@ -2,7 +2,6 @@
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division as division
from . import gl as gl # noqa
from .wrappers import * # noqa

Просмотреть файл

@ -1,4 +1,4 @@
from vispy.gloo.buffer import DataBuffer
from ..gloo.buffer import DataBuffer
from numpy.typing import NDArray
# -*- coding: utf-8 -*-

Просмотреть файл

@ -1,6 +1,6 @@
from typing import Mapping, Any
from vispy.util.event import Event
from vispy.gloo.context import GLContext
from ..util.event import Event
from ..gloo.context import GLContext
# -*- coding: utf-8 -*-
# Copyright (c) Vispy Development Team. All Rights Reserved.

Просмотреть файл

@ -1,4 +1,4 @@
from vispy.gloo.framebuffer import RenderBuffer
from ..gloo.framebuffer import RenderBuffer
from typing import Literal
from numpy.typing import ArrayLike

Просмотреть файл

@ -1,4 +1,4 @@
from vispy.gloo.buffer import VertexBuffer
from ..gloo.buffer import VertexBuffer
from numpy.typing import ArrayLike
# -*- coding: utf-8 -*-

Просмотреть файл

@ -1,4 +1,4 @@
from vispy.gloo.texture import Texture2D
from ..gloo.texture import Texture2D
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------

Просмотреть файл

@ -1,4 +1,4 @@
from np import dtype
from numpy import dtype
from typing import Mapping, Literal
from numpy.typing import ArrayLike

Просмотреть файл

@ -12,8 +12,8 @@ from ..util import load_data_file
# This is the package data dir, not the dir for config, etc.
DATA_DIR = ...
def load_iris() -> NpzFile: ...
def load_crate() -> ArrayLike: ...
def pack_unit(value) -> ArrayLike: ...
def pack_ieee(value) -> ArrayLike: ...
def load_spatial_filters(packed: bool = True) -> tuple[ArrayLike, tuple[str, ...]]: ...
def load_iris() -> dict[str, np.ndarray]: ...
def load_crate() -> np.ndarray: ...
def pack_unit(value) -> np.ndarray: ...
def pack_ieee(value) -> np.ndarray: ...
def load_spatial_filters(packed: bool = True) -> tuple[np.ndarray, tuple[str, ...]]: ...

Просмотреть файл

@ -13,8 +13,8 @@ import zlib
import numpy as np
def _make_png(data, level=6): ...
def read_png(filename: str) -> ArrayLike: ...
def read_png(filename: str) -> np.ndarray: ...
def write_png(filename: str, data: ArrayLike): ...
def imread(filename: str, format: str | None = None) -> ArrayLike: ...
def imread(filename: str, format: str | None = None) -> np.ndarray: ...
def imsave(filename: str, im: ArrayLike, format: str | None = None): ...
def _check_img_lib(): ...

Просмотреть файл

@ -6,13 +6,14 @@ from numpy.typing import ArrayLike
import os
from os import path as op
import numpy as np
from .wavefront import WavefrontReader, WavefrontWriter
from .stl import load_stl
def read_mesh(
fname: str,
) -> tuple[ArrayLike, ArrayLike | None, ArrayLike, ArrayLike | None]: ...
) -> tuple[np.ndarray, np.ndarray | None, np.ndarray, np.ndarray | None]: ...
def write_mesh(
fname: str,
vertices: ArrayLike,

Просмотреть файл

@ -1,9 +1,10 @@
from vispy.geometry.meshdata import MeshData
from vispy.color import Color, ColorMap
from numpy.typing import ArrayLike, NDArray
from typing import Literal
from vispy.util.svg.shapes import Polygon
from vispy.scene.widgets.colorbar import ColorBarWidget
from ..scene.visuals import LinePlot, Spectrogram, Image, Mesh, Polygon, Volume
from ..util.svg.shapes import Polygon
from ..scene.widgets.colorbar import ColorBarWidget
from ..color import Color, Colormap
from ..geometry.meshdata import MeshData
# -*- coding: utf-8 -*-
# Copyright (c) Vispy Development Team. All Rights Reserved.
@ -48,13 +49,13 @@ class PlotWidget(scene.Widget):
def plot(
self,
data,
color: Color = "k",
color: Color|str = "k",
symbol: str | None = None,
line_kind: str = "-",
width: float = 1.0,
marker_size: float = 10.0,
edge_color: Color = "k",
face_color: Color = "b",
edge_color: Color|str = "k",
face_color: Color|str = "b",
edge_width: float = 1.0,
title: str | None = None,
xlabel: str | None = None,
@ -85,7 +86,7 @@ class PlotWidget(scene.Widget):
def surface(self, zdata: ArrayLike, **kwargs): ...
def colorbar(
self,
cmap: str | ColorMap,
cmap: str | Colormap,
position: Literal["left", "right", "top", "bottom"] = "right",
label: str = "",
clim: tuple[float, float] = ...,

Просмотреть файл

@ -7,7 +7,6 @@ from numpy.typing import ArrayLike
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division
from ...util import keys
from ..node import Node

Просмотреть файл

@ -4,12 +4,11 @@ from vispy.util.event import Event
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division
import math
import numpy as np
from ...app import Timer
from ...util.quaternion import Quaternion
from ...util import keys
from .perspective import PerspectiveCamera

Просмотреть файл

@ -3,13 +3,13 @@ from vispy.util.event import Event
# -*- coding: utf-8 -*-
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division
import numpy as np
from .panzoom import PanZoomCamera
from ...visuals.transforms.nonlinear import MagnifyTransform, Magnify1DTransform
from ...app import Timer
class MagnifyCamera(PanZoomCamera):

Просмотреть файл

@ -5,7 +5,6 @@ from vispy.util.event import Event
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division
import numpy as np

Просмотреть файл

@ -5,7 +5,6 @@ from vispy._typing import Scalar
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division
import math
import numpy as np

Просмотреть файл

@ -1,20 +1,19 @@
from vispy.scene.node import Node
from vispy.gloo.framebuffer import FrameBuffer
from vispy.util.event import Event
from ..scene.node import Node
from ..gloo.framebuffer import FrameBuffer
from ..util.event import Event
from numpy.typing import ArrayLike
from vispy.visuals.visual import Visual
from ..visuals.visual import Visual
from typing import Mapping
from vispy.gloo.context import GLContext
from vispy.scene.widgets.widget import Widget
from vispy.util.svg.color import Color
from vispy.app.application import Application
from vispy.app.canvas import Canvas, DrawEvent
from ..gloo.context import GLContext
from ..scene.widgets.widget import Widget
from ..util.svg.color import Color
from ..app.application import Application
from ..app.canvas import Canvas, DrawEvent
# -*- coding: utf-8 -*-
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division
import weakref
import numpy as np
@ -30,6 +29,7 @@ from .subscene import SubScene
from .events import SceneMouseEvent
from .widgets import Widget
class SceneCanvas(app.Canvas, Frozen):
def __init__(
self,

Просмотреть файл

@ -2,7 +2,6 @@
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division
from ..util.event import Event

Просмотреть файл

@ -1,15 +1,13 @@
from vispy.scene.node import Node
from vispy.util.event import Event
from ..scene.node import Node
from ..util.event import Event
from numpy.typing import ArrayLike
from vispy.visuals.transforms.chain import ChainTransform
from vispy.visuals.transforms.transform_system import TransformSystem
from ..visuals.transforms.chain import ChainTransform
from ..visuals.transforms.transform_system import TransformSystem
# -*- coding: utf-8 -*-
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division
import weakref
from ..util.event import Event, EmitterGroup

Просмотреть файл

@ -2,7 +2,6 @@
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division
from .node import Node

Просмотреть файл

@ -1,4 +1,4 @@
from vispy.scene.node import Node
from ..scene.node import Node
# -*- coding: utf-8 -*-
# Copyright (c) Vispy Development Team. All Rights Reserved.

Просмотреть файл

@ -1,6 +1,6 @@
from vispy.util.event import Event
from typing import Literal
from vispy.color import ColorMap, Color
from vispy.color import Colormap, Color
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
@ -15,7 +15,7 @@ from ...visuals import ColorBarVisual
class ColorBarWidget(Widget):
def __init__(
self,
cmap: str | ColorMap,
cmap: str | Colormap,
orientation: Literal["left", "right", "top", "bottom"],
label: str = "",
label_color: str | Color = "black",

Просмотреть файл

@ -4,7 +4,7 @@ from vispy.scene.widgets.widget import Widget
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division
import numpy as np
from vispy.geometry import Rect

Просмотреть файл

@ -5,8 +5,6 @@ from vispy.util.event import Event
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division
import numpy as np
from .widget import Widget

Просмотреть файл

@ -4,7 +4,6 @@ from vispy.scene.widgets.widget import Widget
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division
import numpy as np

Просмотреть файл

@ -5,7 +5,6 @@ from numpy.typing import ArrayLike
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import print_function
import sys
import os

Просмотреть файл

@ -11,7 +11,7 @@ import sys
import os
import inspect
import gc
import pytest
import functools
from distutils.version import LooseVersion

Просмотреть файл

@ -6,8 +6,8 @@
from typing import Optional, Any
import numpy as np
from numpy.typing import ArrayLike, DtypeLike
import pytest
from numpy.typing import ArrayLike, DTypeLike
def compare_render(
orig_data: ArrayLike,
@ -15,5 +15,5 @@ def compare_render(
previous_render: Optional[ArrayLike] = None,
atol: Optional[float] = 1.0,
): ...
def max_for_dtype(input_dtype: DtypeLike): ...
def max_for_dtype(input_dtype: DTypeLike): ...
def make_rgba(data_in: ArrayLike) -> ArrayLike: ...

Просмотреть файл

@ -14,7 +14,6 @@ from .config import (
get_config_keys as get_config_keys, # noqa
set_data_dir as set_data_dir,
_TempDir as _TempDir,
_get_args as _get_args,
) # noqa
from .fetching import load_data_file as load_data_file # noqa
from .frozen import Frozen as Frozen # noqa

Просмотреть файл

@ -6,8 +6,6 @@ from numpy.typing import ArrayLike
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division
from collections import OrderedDict
import inspect
import traceback

Просмотреть файл

@ -7,7 +7,7 @@
__all__ = ["list_fonts"]
from ._triage import (
_load_glyph as _load_glyph,
list_fonts as list_fonts,
) # noqa, analysis:ignore
from ._vispy_fonts import _vispy_fonts as _vispy_fonts # noqa, analysis:ignore

Просмотреть файл

@ -61,7 +61,7 @@ class use_log_level(object):
match: str | None = None,
record: bool = False,
print_msg: bool = True,
) -> ArrayLike: ...
): ...
def __enter__(self): ...
def __exit__(self, type, value, traceback): ...

Просмотреть файл

@ -1,10 +1,9 @@
from np import dtype
from numpy import dtype
from numpy.typing import ArrayLike, NDArray
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import division
# Note: we use functions (e.g. sin) from math module because they're faster

Просмотреть файл

@ -5,7 +5,7 @@ from numpy.typing import ArrayLike
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
import subprocess
from .config import _get_args
def use(app: str | None = None, gl: str | None = None): ...
def run_subprocess(

Просмотреть файл

@ -1,4 +1,4 @@
from np import dtype
from numpy import dtype
from numpy.typing import NDArray
# -*- coding: utf-8 -*-

Просмотреть файл

@ -73,8 +73,6 @@ class AxisVisual(CompoundVisual):
def tick_font_size(self, value): ...
@updating_property
def tick_direction(self): ...
@tick_direction.setter
def tick_direction(self, tick_direction): ...
@property
def axis_font_size(self): ...
@axis_font_size.setter
@ -85,8 +83,6 @@ class AxisVisual(CompoundVisual):
def axis_label(self): ...
@updating_property
def pos(self): ...
@pos.setter
def pos(self, pos): ...
@updating_property
def minor_tick_length(self): ...
@updating_property

Просмотреть файл

@ -7,8 +7,6 @@ from numpy.typing import ArrayLike, NDArray
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -----------------------------------------------------------------------------
from __future__ import division
import math
import numpy as np
from ...gloo import Texture2D, VertexBuffer, IndexBuffer

Просмотреть файл

@ -1,4 +1,4 @@
from np import dtype
from numpy import dtype
from numpy.typing import ArrayLike
# -*- coding: utf-8 -*-
@ -22,7 +22,7 @@ class Collection(BaseCollection):
self,
dtype: ArrayLike,
itype: np.dtype | None,
mode: GL_ENUM,
mode,
vertex: str | tuple[str, ...],
fragment: str | tuple[str, ...],
program=None,

Просмотреть файл

@ -7,7 +7,6 @@ from numpy.typing import ArrayLike, NDArray
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -----------------------------------------------------------------------------
from __future__ import division
import numpy as np
from ... import glsl

Просмотреть файл

@ -5,7 +5,6 @@ from numpy.typing import ArrayLike
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division
import numpy as np
from .polygon import PolygonVisual

Просмотреть файл

@ -1,5 +1,6 @@
from numpy.typing import ArrayLike, NDArray
# -*- coding: utf-8 -*-
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
@ -7,6 +8,7 @@ from numpy.typing import ArrayLike, NDArray
from ..visual import CompoundVisual
from ..line import ArrowVisual
from ..markers import MarkersVisual
from ...color import Colormap
from . import layouts
class GraphVisual(CompoundVisual):
@ -25,14 +27,14 @@ class GraphVisual(CompoundVisual):
directed: bool = False,
layout: str | None = None,
animate: bool = False,
line_color: str | ColorMap | None = None,
line_color: str | Colormap | None = None,
line_width: float | None = None,
arrow_type: str | None = None,
arrow_size: float | None = None,
node_symbol: str | None = None,
node_size: float | None = None,
border_color: str | ColorMap | None = None,
face_color: str | ColorMap | None = None,
border_color: str | Colormap | None = None,
face_color: str | Colormap | None = None,
border_width: float | None = None,
): ...
@property

Просмотреть файл

@ -3,7 +3,7 @@ from typing import Mapping, Iterable
# -*- coding: utf-8 -*-
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.#!/usr/bin/env python3
from ..util import _straight_line_vertices, issparse
from ..util import _straight_line_vertices
import numpy as np
class NetworkxCoordinates:

Просмотреть файл

@ -5,8 +5,10 @@ from numpy.typing import ArrayLike, NDArray
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
import numpy as np
from numpy.random import RandomState
from ..util import _straight_line_vertices, issparse
from ..util import _straight_line_vertices
def random(
adjacency_mat: ArrayLike | NDArray,

Просмотреть файл

@ -4,7 +4,6 @@ from vispy.util.svg.color import Color
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division
from .image import ImageVisual
from ..color import Color

Просмотреть файл

@ -1,15 +1,13 @@
from np import dtype
from numpy import dtype
from numpy.typing import NDArray, ArrayLike
# -*- coding: utf-8 -*-
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division
import numpy as np
from vispy.color import colormap
from ..color import Colormap
from ..gloo import Texture2D, VertexBuffer
from ..gloo.texture import should_cast_to_f32

Просмотреть файл

@ -4,8 +4,6 @@ from numpy.typing import NDArray
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division
import numpy as np
from vispy.color.color_array import Color

Просмотреть файл

@ -1,4 +1,4 @@
from np import ndarray
from numpy import ndarray
from vispy.util.svg.color import Color
from numpy.typing import NDArray
from vispy._typing import ArrayLike
@ -7,8 +7,6 @@ from vispy._typing import ArrayLike
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division
import numpy as np
from .line import LineVisual

Просмотреть файл

@ -6,7 +6,6 @@ from vispy.visuals.line.arrow import ArrowVisual
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division
import numpy as np

Просмотреть файл

@ -5,7 +5,6 @@ from numpy.typing import ArrayLike
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division
from functools import lru_cache
import numpy as np

Просмотреть файл

@ -5,7 +5,6 @@ from typing import Sequence
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division
import numpy as np
@ -14,7 +13,7 @@ from .mesh import MeshVisual
from .line import LineVisual
from ..color import Color
from ..geometry import PolygonData
from ..gloo import set_state
class PolygonVisual(CompoundVisual):
def __init__(

Просмотреть файл

@ -5,7 +5,6 @@ from numpy.typing import ArrayLike
# Copradiusight (c) 2014, Vispy Development Team.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division
import numpy as np
from ..color import Color

Просмотреть файл

@ -4,8 +4,6 @@ from typing import Sequence
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division
from .ellipse import EllipseVisual
class RegularPolygonVisual(EllipseVisual):

Просмотреть файл

@ -11,25 +11,21 @@ from numpy.typing import ArrayLike
##############################################################################
# Load font into texture
from __future__ import division
import numpy as np
from copy import deepcopy
import sys
from ._sdf_gpu import SDFRendererGPU
from ._sdf_cpu import _calc_distance_field
from ...gloo import TextureAtlas, IndexBuffer, VertexBuffer
from ...gloo import context
from ...gloo.wrappers import _check_valid
from ...util.fonts import _load_glyph
from ..transforms import STTransform
from ...color import ColorArray
from ..visual import Visual
from ...io import load_spatial_filters
class TextureFont(object):
def __init__(self, font: Mapping, renderer: SDFRenderer): ...
def __init__(self, font: Mapping, renderer:SDFRendererGPU): ...
@property
def ratio(self): ...
@property
@ -60,7 +56,7 @@ class TextVisual(Visual):
def __init__(
self,
text: str | ArrayLike | None = None,
color: Color = "black",
color: Color|str = "black",
bold: bool = False,
italic: bool = False,
face: str = "OpenSans",

Просмотреть файл

@ -5,7 +5,6 @@ from numpy.typing import ArrayLike
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division
import functools

Просмотреть файл

@ -6,8 +6,6 @@ from numpy.typing import ArrayLike, NDArray
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division
from ..shaders import FunctionChain
from .base_transform import BaseTransform
from .linear import NullTransform
@ -17,11 +15,6 @@ class ChainTransform(BaseTransform):
glsl_map = ...
glsl_imap = ...
Linear: bool = ...
Orthogonal: bool = ...
NonScaling: bool = ...
Isometric: bool = ...
def __init__(self, *transforms: Sequence[BaseTransform]): ...
@property
def transforms(self): ...

Просмотреть файл

@ -4,7 +4,6 @@ from vispy.app.canvas import Canvas
# -*- coding: utf-8 -*-
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division
import numpy as np
from .linear import STTransform

Просмотреть файл

@ -1,4 +1,4 @@
from np import ndarray
from numpy import ndarray
from vispy.visuals.transforms.linear import STTransform
from numpy.typing import ArrayLike, NDArray
@ -6,8 +6,6 @@ from numpy.typing import ArrayLike, NDArray
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division
import numpy as np
from ...util import transforms

Просмотреть файл

@ -4,8 +4,6 @@ from numpy.typing import ArrayLike
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division
import numpy as np
from ._util import arg_to_array, arg_to_vec4, as_vec4

Просмотреть файл

@ -1,7 +1,6 @@
from vispy.util.svg.color import Color
from vispy.color.color_array import ColorArray
from numpy.typing import NDArray
from __future__ import division
from .mesh import MeshVisual
import numpy as np