mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-04 19:10:09 +01:00
Fix typos and trim whitespace
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
# Name: _nanosvg.pdx
|
# Name: _nanosvg.pdx
|
||||||
# Purpose: Cython decarlations for the items in the nanosvg code
|
# Purpose: Cython decarlations for the items in the nanosvg code
|
||||||
# we're wrapping. See https://github.com/memononen/nanosvg and
|
# we're wrapping. See https://github.com/memononen/nanosvg and
|
||||||
# {Phoenix}/ext/nanosvg/src
|
# {Phoenix}/ext/nanosvg/src
|
||||||
#
|
#
|
||||||
# Author: Robin Dunn
|
# Author: Robin Dunn
|
||||||
#
|
#
|
||||||
# Created: 23-July-2019
|
# Created: 23-July-2019
|
||||||
@@ -60,7 +60,7 @@ cdef extern from 'nanosvg.h':
|
|||||||
char type
|
char type
|
||||||
unsigned int color
|
unsigned int color
|
||||||
NSVGgradient* gradient
|
NSVGgradient* gradient
|
||||||
|
|
||||||
|
|
||||||
ctypedef struct NSVGpath:
|
ctypedef struct NSVGpath:
|
||||||
float *pts
|
float *pts
|
||||||
@@ -113,4 +113,3 @@ cdef extern from 'nanosvgrast.h':
|
|||||||
NSVGrasterizer* r,
|
NSVGrasterizer* r,
|
||||||
NSVGimage* image, float tx, float ty, float scale,
|
NSVGimage* image, float tx, float ty, float scale,
|
||||||
unsigned char* dst, int w, int h, int stride)
|
unsigned char* dst, int w, int h, int stride)
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ def get_save_path(url, dest_dir, force=False):
|
|||||||
return (url, filename)
|
return (url, filename)
|
||||||
|
|
||||||
def download_wget(url, filename, trusted=False):
|
def download_wget(url, filename, trusted=False):
|
||||||
""" Try to donwload via wget."""
|
""" Try to download via wget."""
|
||||||
result = False
|
result = False
|
||||||
try:
|
try:
|
||||||
cmd = ["wget", url, '-O', filename]
|
cmd = ["wget", url, '-O', filename]
|
||||||
@@ -107,7 +107,7 @@ def download_wget(url, filename, trusted=False):
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
def download_urllib(url, filename):
|
def download_urllib(url, filename):
|
||||||
""" Try to donwload via urllib."""
|
""" Try to download via urllib."""
|
||||||
print("Trying to Download via urllib from:\n ", url)
|
print("Trying to Download via urllib from:\n ", url)
|
||||||
keep_going = True
|
keep_going = True
|
||||||
try:
|
try:
|
||||||
@@ -149,12 +149,12 @@ def download_urllib(url, filename):
|
|||||||
message+status)
|
message+status)
|
||||||
wx.Sleep(0.08) # Give the GUI some update time
|
wx.Sleep(0.08) # Give the GUI some update time
|
||||||
progress.Destroy()
|
progress.Destroy()
|
||||||
|
|
||||||
result = os.path.exists(filename) and os.stat(filename).st_size > 0
|
result = os.path.exists(filename) and os.stat(filename).st_size > 0
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def download_pip(url, filename, force=False, trusted=False):
|
def download_pip(url, filename, force=False, trusted=False):
|
||||||
""" Try to donwload via pip."""
|
""" Try to download via pip."""
|
||||||
download_dir = os.path.split(filename)[0]
|
download_dir = os.path.split(filename)[0]
|
||||||
if len(download_dir) == 0:
|
if len(download_dir) == 0:
|
||||||
download_dir = '.'
|
download_dir = '.'
|
||||||
|
|||||||
Reference in New Issue
Block a user