Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
David MacDonald
purr-data
Commits
9b772ac0
Commit
9b772ac0
authored
Sep 18, 2013
by
Ivica Bukvic
Browse files
fixed regression of drawing ellipses/circles and their redraw in response to move command
parent
06ebe488
Changes
3
Hide whitespace changes
Inline
Side-by-side
pd/tkpath/ChangeLog
View file @
9b772ac0
...
...
@@ -18,6 +18,7 @@
* tclconfig/tcl.m4:
* configure, configure.in: Updated to TEA 3.9.
* generic/*.c: Various fixes for mingw32/mingw64.
* configure, configure.in: Bumped revision to 0.3.3
2011-10-28 Peter Spjuth <peter.spjuth@gmail.com>
...
...
pd/tkpath/generic/path.c
View file @
9b772ac0
...
...
@@ -18,7 +18,7 @@
/* Keep patch level release numbers odd and set even only on release. */
#define TKPATH_VERSION "0.3"
#define TKPATH_PATCHLEVEL "0.3.
2
"
#define TKPATH_PATCHLEVEL "0.3.
3
"
#define TKPATH_REQUIRE "8.5"
int
gAntiAlias
=
1
;
...
...
pd/tkpath/generic/tkCanvEllipse.c
View file @
9b772ac0
...
...
@@ -215,6 +215,8 @@ CreateAny(Tcl_Interp *interp, Tk_PathCanvas canvas, struct Tk_PathItem *itemPtr,
itemExPtr
->
canvas
=
canvas
;
itemExPtr
->
styleObj
=
NULL
;
itemExPtr
->
styleInst
=
NULL
;
itemPtr
->
bbox
=
NewEmptyPathRect
();
itemPtr
->
totalBbox
=
NewEmptyPathRect
();
ellPtr
->
type
=
type
;
if
(
ellPtr
->
type
==
kOvalTypeCircle
)
{
...
...
@@ -290,7 +292,6 @@ ComputeEllipseBbox(Tk_PathCanvas canvas, EllipseItem *ellPtr)
Tk_PathItem
*
itemPtr
=
&
itemExPtr
->
header
;
Tk_PathStyle
style
;
Tk_PathState
state
=
itemExPtr
->
header
.
state
;
PathRect
totalBbox
,
bbox
;
if
(
state
==
TK_PATHSTATE_NULL
)
{
state
=
TkPathCanvasState
(
canvas
);
...
...
@@ -301,9 +302,9 @@ ComputeEllipseBbox(Tk_PathCanvas canvas, EllipseItem *ellPtr)
return
;
}
style
=
TkPathCanvasInheritStyle
(
itemPtr
,
kPathMergeStyleNotFill
);
bbox
=
GetBareBbox
(
ellPtr
);
totalBbox
=
GetGenericPathTotalBboxFromBare
(
NULL
,
&
style
,
&
bbox
);
SetGenericPathHeaderBbox
(
&
itemExPtr
->
header
,
style
.
matrixPtr
,
&
totalBbox
);
itemPtr
->
bbox
=
GetBareBbox
(
ellPtr
);
itemPtr
->
totalBbox
=
GetGenericPathTotalBboxFromBare
(
NULL
,
&
style
,
&
itemPtr
->
bbox
);
SetGenericPathHeaderBbox
(
&
itemExPtr
->
header
,
style
.
matrixPtr
,
&
itemPtr
->
totalBbox
);
TkPathCanvasFreeInheritedStyle
(
&
style
);
}
...
...
@@ -399,7 +400,7 @@ DisplayEllipse(Tk_PathCanvas canvas, Tk_PathItem *itemPtr, Display *display, Dra
{
EllipseItem
*
ellPtr
=
(
EllipseItem
*
)
itemPtr
;
TMatrix
m
=
GetCanvasTMatrix
(
canvas
);
PathRect
bbox
;
//
PathRect bbox;
PathAtom
*
atomPtr
;
EllipseAtom
ellAtom
;
Tk_PathStyle
style
;
...
...
@@ -419,9 +420,9 @@ DisplayEllipse(Tk_PathCanvas canvas, Tk_PathItem *itemPtr, Display *display, Dra
ellAtom
.
rx
=
ellPtr
->
rx
;
ellAtom
.
ry
=
ellPtr
->
ry
;
bbox
=
GetBareBbox
(
ellPtr
);
itemPtr
->
bbox
=
GetBareBbox
(
ellPtr
);
style
=
TkPathCanvasInheritStyle
(
itemPtr
,
0
);
TkPathDrawPath
(
Tk_PathCanvasTkwin
(
canvas
),
drawable
,
atomPtr
,
&
style
,
&
m
,
&
bbox
);
TkPathDrawPath
(
Tk_PathCanvasTkwin
(
canvas
),
drawable
,
atomPtr
,
&
style
,
&
m
,
&
itemPtr
->
bbox
);
TkPathCanvasFreeInheritedStyle
(
&
style
);
}
...
...
@@ -630,6 +631,9 @@ TranslateEllipse(Tk_PathCanvas canvas, Tk_PathItem *itemPtr, double deltaX, doub
ellPtr
->
center
[
0
]
+=
deltaX
;
ellPtr
->
center
[
1
]
+=
deltaY
;
//TranslatePathAtoms(ellPtr->atomPtr, deltaX, deltaY);
TranslatePathRect
(
&
itemPtr
->
bbox
,
deltaX
,
deltaY
);
TranslatePathRect
(
&
itemPtr
->
totalBbox
,
deltaX
,
deltaY
);
TranslateItemHeader
(
itemPtr
,
deltaX
,
deltaY
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment