Python os.path.iter_segments() Examples
The following are 10
code examples of os.path.iter_segments().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
os.path
, or try the search function
.
Example #1
Source File: backend_wx.py From Computable with MIT License | 5 votes |
def convert_path(gfx_ctx, path, transform): wxpath = gfx_ctx.CreatePath() for points, code in path.iter_segments(transform): if code == Path.MOVETO: wxpath.MoveToPoint(*points) elif code == Path.LINETO: wxpath.AddLineToPoint(*points) elif code == Path.CURVE3: wxpath.AddQuadCurveToPoint(*points) elif code == Path.CURVE4: wxpath.AddCurveToPoint(*points) elif code == Path.CLOSEPOLY: wxpath.CloseSubpath() return wxpath
Example #2
Source File: backend_wx.py From Mastering-Elasticsearch-7.0 with MIT License | 5 votes |
def convert_path(gfx_ctx, path, transform): wxpath = gfx_ctx.CreatePath() for points, code in path.iter_segments(transform): if code == Path.MOVETO: wxpath.MoveToPoint(*points) elif code == Path.LINETO: wxpath.AddLineToPoint(*points) elif code == Path.CURVE3: wxpath.AddQuadCurveToPoint(*points) elif code == Path.CURVE4: wxpath.AddCurveToPoint(*points) elif code == Path.CLOSEPOLY: wxpath.CloseSubpath() return wxpath
Example #3
Source File: backend_wx.py From matplotlib-4-abaqus with MIT License | 5 votes |
def convert_path(gfx_ctx, path, transform): wxpath = gfx_ctx.CreatePath() for points, code in path.iter_segments(transform): if code == Path.MOVETO: wxpath.MoveToPoint(*points) elif code == Path.LINETO: wxpath.AddLineToPoint(*points) elif code == Path.CURVE3: wxpath.AddQuadCurveToPoint(*points) elif code == Path.CURVE4: wxpath.AddCurveToPoint(*points) elif code == Path.CLOSEPOLY: wxpath.CloseSubpath() return wxpath
Example #4
Source File: backend_wx.py From neural-network-animation with MIT License | 5 votes |
def convert_path(gfx_ctx, path, transform): wxpath = gfx_ctx.CreatePath() for points, code in path.iter_segments(transform): if code == Path.MOVETO: wxpath.MoveToPoint(*points) elif code == Path.LINETO: wxpath.AddLineToPoint(*points) elif code == Path.CURVE3: wxpath.AddQuadCurveToPoint(*points) elif code == Path.CURVE4: wxpath.AddCurveToPoint(*points) elif code == Path.CLOSEPOLY: wxpath.CloseSubpath() return wxpath
Example #5
Source File: backend_wx.py From GraphicDesignPatternByPython with MIT License | 5 votes |
def convert_path(gfx_ctx, path, transform): wxpath = gfx_ctx.CreatePath() for points, code in path.iter_segments(transform): if code == Path.MOVETO: wxpath.MoveToPoint(*points) elif code == Path.LINETO: wxpath.AddLineToPoint(*points) elif code == Path.CURVE3: wxpath.AddQuadCurveToPoint(*points) elif code == Path.CURVE4: wxpath.AddCurveToPoint(*points) elif code == Path.CLOSEPOLY: wxpath.CloseSubpath() return wxpath
Example #6
Source File: backend_wx.py From python3_ios with BSD 3-Clause "New" or "Revised" License | 5 votes |
def convert_path(gfx_ctx, path, transform): wxpath = gfx_ctx.CreatePath() for points, code in path.iter_segments(transform): if code == Path.MOVETO: wxpath.MoveToPoint(*points) elif code == Path.LINETO: wxpath.AddLineToPoint(*points) elif code == Path.CURVE3: wxpath.AddQuadCurveToPoint(*points) elif code == Path.CURVE4: wxpath.AddCurveToPoint(*points) elif code == Path.CLOSEPOLY: wxpath.CloseSubpath() return wxpath
Example #7
Source File: backend_wx.py From ImageFusion with MIT License | 5 votes |
def convert_path(gfx_ctx, path, transform): wxpath = gfx_ctx.CreatePath() for points, code in path.iter_segments(transform): if code == Path.MOVETO: wxpath.MoveToPoint(*points) elif code == Path.LINETO: wxpath.AddLineToPoint(*points) elif code == Path.CURVE3: wxpath.AddQuadCurveToPoint(*points) elif code == Path.CURVE4: wxpath.AddCurveToPoint(*points) elif code == Path.CLOSEPOLY: wxpath.CloseSubpath() return wxpath
Example #8
Source File: backend_wx.py From coffeegrindsize with MIT License | 5 votes |
def convert_path(gfx_ctx, path, transform): wxpath = gfx_ctx.CreatePath() for points, code in path.iter_segments(transform): if code == Path.MOVETO: wxpath.MoveToPoint(*points) elif code == Path.LINETO: wxpath.AddLineToPoint(*points) elif code == Path.CURVE3: wxpath.AddQuadCurveToPoint(*points) elif code == Path.CURVE4: wxpath.AddCurveToPoint(*points) elif code == Path.CLOSEPOLY: wxpath.CloseSubpath() return wxpath
Example #9
Source File: backend_wx.py From CogAlg with MIT License | 5 votes |
def convert_path(gfx_ctx, path, transform): wxpath = gfx_ctx.CreatePath() for points, code in path.iter_segments(transform): if code == Path.MOVETO: wxpath.MoveToPoint(*points) elif code == Path.LINETO: wxpath.AddLineToPoint(*points) elif code == Path.CURVE3: wxpath.AddQuadCurveToPoint(*points) elif code == Path.CURVE4: wxpath.AddCurveToPoint(*points) elif code == Path.CLOSEPOLY: wxpath.CloseSubpath() return wxpath
Example #10
Source File: backend_wx.py From twitter-stock-recommendation with MIT License | 5 votes |
def convert_path(gfx_ctx, path, transform): wxpath = gfx_ctx.CreatePath() for points, code in path.iter_segments(transform): if code == Path.MOVETO: wxpath.MoveToPoint(*points) elif code == Path.LINETO: wxpath.AddLineToPoint(*points) elif code == Path.CURVE3: wxpath.AddQuadCurveToPoint(*points) elif code == Path.CURVE4: wxpath.AddCurveToPoint(*points) elif code == Path.CLOSEPOLY: wxpath.CloseSubpath() return wxpath