8000 *** empty log message *** · matplotlib/matplotlib@53607cd · GitHub
[go: up one dir, main page]

Skip to content

Commit 53607cd

Browse files
committed
*** empty log message ***
svn path=/trunk/matplotlib/; revision=1031
1 parent 4823bef commit 53607cd

File tree

2 files changed

+20
-18
lines changed

2 files changed

+20
-18
lines changed

setupext.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -382,9 +382,6 @@ def build_agg(ext_modules, packages, numerix):
382382
global BUILT_AGG
383383
if BUILT_AGG: return # only build it if you you haven't already
384384

385-
386-
387-
388385
if numerix in ["numarray","both"]: # Build for numarray
389386
deps = ['src/ft2font.cpp', 'src/mplutils.cpp']
390387
deps.extend(glob.glob('agg22/src/*.cpp'))
@@ -484,7 +481,9 @@ def build_transforms(ext_modules, packages, numerix):
484481
libraries = ['stdc++', 'm'],
485482
include_dirs = ['src', '.'],
4864 10000 83
)
484+
487485
module.extra_compile_args.append("-DNUMARRAY=1")
486+
add_base_flags(module)
488487
ext_modules.append(module)
489488

490489
if numerix in ["Numeric","both"]: # Build for Numeric
@@ -498,6 +497,7 @@ def build_transforms(ext_modules, packages, numerix):
498497
include_dirs = ['src', '.'],
499498
)
500499
module.extra_compile_args.append("-DNUMERIC=1")
500+
add_base_flags(module)
501501
ext_modules.append(module)
502502

503503

@@ -530,6 +530,7 @@ def build_contour(ext_modules, packages, numerix):
530530
libraries = ['stdc++'],
531531
)
532532
module.extra_compile_args.append('-DNUMARRAY=1')
533+
add_base_flags(module)
533534
ext_modules.append(module)
534535

535536
if numerix in ["Numeric","both"]: # Build for Numeric
@@ -542,6 +543,7 @@ def build_contour(ext_modules, packages, numerix):
542543
libraries = ['stdc++'],
543544
)
544545
module.extra_compile_args.append('-DNUMERIC=1')
546+
add_base_flags(module)
545547
ext_modules.append(module)
546548

547549
BUILT_CONTOUR = True

src/_backend_agg.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ RendererAgg::draw_polygon(const Py::Tuple& args) {
376376
double xs[Npoints];
377377
double ys[Npoints];
378378
Py::Tuple xy;
379-
for (size_t i=0; i<Npoints; ++i) {
379+
for (size_t i=0; i<Npoints; i++) {
380380
xy = Py::Tuple(points[i]);
381381
xs[i] = Py::Float(xy[0]);
382382
ys[i] = Py::Float(xy[1]);
@@ -386,7 +386,7 @@ RendererAgg::draw_polygon(const Py::Tuple& args) {
386386

387387

388388
agg::path_storage path;
389-
for (size_t j=0; j<Npoints; ++j) {
389+
for (size_t j=0; j<Npoints; j++) {
390390

391391
double x = xs[j];
392392
double y = ys[j];
@@ -473,7 +473,7 @@ RendererAgg::draw_line_collection(const Py::Tuple& args) {
473473
std::pair<double, double> xy;
474474
Py::SeqBase<Py::Object> xyo;
475475
Py::SeqBase<Py::Object> xys;
476-
for (size_t i=0; i<N; ++i) {
476+
for (size_t i=0; i<N; i++) {
477477
if (usingOffsets) {
478478
xyo = Py::SeqBase<Py::Object>(offsets[i%Noffsets]);
479479
xo = Py::Float(xyo[0]);
@@ -645,7 +645,7 @@ RendererAgg::draw_poly_collection(const Py::Tuple& args) {
645645

646646
std::pair<double, double> xyo, xy;
647647
Py::SeqBase<Py::Object> thisverts;
648-
for (size_t i=0; i<N; ++i) {
648+
for (size_t i=0; i<N; i++) {
649649

650650
thisverts = verts[i % Nverts];
651651

@@ -671,7 +671,7 @@ RendererAgg::draw_poly_collection(const Py::Tuple& args) {
671671
// dump the verts to double arrays so we can do more efficient
672672
// look aheads and behinds when doing snapto pixels
673673
double xs[Nverts], ys[Nverts];
674-
for (size_t j=0; j<Nverts; ++j) {
674+
for (size_t j=0; j<Nverts; j++) {
675675
thisvert = thisverts[j];
676676
double x = Py::Float(thisvert[0]);
677677
double y = Py::Float(thisvert[1]);
@@ -694,7 +694,7 @@ RendererAgg::draw_poly_collection(const Py::Tuple& args) {
694694

695695
}
696696

697-
for (size_t j=0; j<Nverts; ++j) {
697+
for (size_t j=0; j<Nverts; j++) {
698698

699699
double x = xs[j];
700700
double y = ys[j];
@@ -824,14 +824,14 @@ RendererAgg::draw_regpoly_collection(const Py::Tuple& args) {
824824
double xverts[Nverts];
825825
double yverts[Nverts];
826826
Py::SeqBase<Py::Object> xy;
827-
for (size_t i=0; i<Nverts; ++i) {
827+
for (size_t i=0; i<Nverts; i++) {
828828
xy = Py::SeqBase<Py::Object>(verts[i]);
829829
xverts[i] = Py::Float(xy[0]);
830830
yverts[i] = Py::Float(xy[1]);
831831
}
832832

833833
std::pair<double, double> offsetPair;
834-
for (size_t i=0; i<Noffsets; ++i) {
834+
for (size_t i=0; i<Noffsets; i++) {
835835
Py::SeqBase<Py::Object> pos = Py::SeqBase<Py::Object>(offsets[i]);
836836
double xo = Py::Float(pos[0]);
837837
double yo = Py::Float(pos[1]);
@@ -849,7 +849,7 @@ RendererAgg::draw_regpoly_collection(const Py::Tuple& args) {
849849

850850
agg::path_storage path;
851851

852-
for (size_t j=0; j<Nverts; ++j) {
852+
for (size_t j=0; j<Nverts; j++) {
853853
thisx = scale*xverts[j] + offsetPair.first;
854854
thisy = scale*yverts[j] + offsetPair.second;
855855
thisy = height - thisy;
@@ -967,7 +967,7 @@ RendererAgg::draw_lines(const Py::Tuple& args) {
967967

968968
double lastx(-2.0), lasty(-2.0);
969969

970-
for (size_t i=0; i<Nx; ++i) {
970+
for (size_t i=0; i<Nx; i++) {
971971
thisx = *(double *)(xa->data + i*xa->strides[0]);
972972
thisy = *(double *)(ya->data + i*ya->strides[0]);
973973

@@ -1176,7 +1176,7 @@ RendererAgg::draw_markers(const Py::Tuple& args) {
11761176
}
11771177

11781178
double thisx, thisy;
1179-
for (size_t i=0; i<Nx; ++i) {
1179+
for (size_t i=0; i<Nx; i++) {
11801180
thisx = *(double *)(xa->data + i*xa->strides[0]);
11811181
thisy = *(double *)(ya->data + i*ya->strides[0]);
11821182

@@ -1254,7 +1254,7 @@ RendererAgg::draw_path(const Py::Tuple& args) {
12541254
double x, y;
12551255
unsigned cmd;
12561256
bool curvy = false;
1257-
for (size_t i=0; i<Nx; ++i) {
1257+
for (size_t i=0; i<Nx; i++) {
12581258
cmd = path->vertex(i, &x, &y);
12591259
if (cmd==agg::path_cmd_curve3 || cmd==agg::path_cmd_curve4) curvy=true;
12601260
if (needNonlinear)
@@ -1319,8 +1319,8 @@ RendererAgg::draw_text(const Py::Tuple& args) {
13191319
}
13201320

13211321

1322-
for (size_t i=0; i<font->image.width; ++i) {
1323-
for (size_t j=0; j<font->image.height; ++j) {
1322+
for (size_t i=0; i<font->image.width; i++) {
1323+
for (size_t j=0; j<font->image.height; j++) {
13241324
thisx = i+x+font->image.offsetx;
13251325
thisy = j+y+font->image.offsety;
13261326
if (thisx<l || thisx>=r) continue;
@@ -1424,7 +1424,7 @@ RendererAgg::write_rgba(const Py::Tuple& args) {
14241424
std::string fname = Py::String( args[0]);
14251425

14261426
std::ofstream of2( fname.c_str(), std::ios::binary|std::ios::out);
1427-
for (size_t i=0; i<NUMBYTES; ++i) {
1427+
for (size_t i=0; i<NUMBYTES; i++) {
14281428
of2.write((char*)&(pixBuffer[i]), sizeof(char));
14291429
}
14301430
return Py::Object();

0 commit comments

Comments
 (0)
0