Skip to content

Commit

Permalink
Merge pull request ghaerr#9 from aggeom/feature/sync-with-svn
Browse files Browse the repository at this point in the history
Sync with svn repo, update to r139
  • Loading branch information
Anton authored Aug 29, 2023
2 parents b65e1bb + 80e4537 commit c8a3826
Show file tree
Hide file tree
Showing 42 changed files with 876 additions and 100 deletions.
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AC_INIT(agg, 2.6.0)
AC_INIT(agg, 2.7.0)
AC_CONFIG_SRCDIR(src/agg_arc.cpp)
AC_CANONICAL_TARGET
AC_CONFIG_HEADERS(include/config.h)
Expand Down Expand Up @@ -127,7 +127,7 @@ AC_SUBST(x_libraries)
dnl ###############################################

dnl Settung up library version
AGG_LIB_VERSION="2:6:0"
AGG_LIB_VERSION="2:7:0"
dnl current-´ / /
dnl revision--´ /
dnl age---´
Expand Down
35 changes: 7 additions & 28 deletions examples/BeOS/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -338,48 +338,27 @@ clean:
rm -rf gpc_test

agg.ppm:
@echo "Required file missing!!"
@echo "Please download http://www.antigrain.com/agg.ppm to /examples/X11/"
@echo "Attempting to retrieve via wget: (will fail if wget is not installed)"
wget http://www.antigrain.com/agg.ppm
cp ../art/agg.ppm .

compositing.ppm:
@echo "Required file missing!!"
@echo "Please download http://www.antigrain.com/compositing.ppm to /examples/X11/"
@echo "Attempting to retrieve via wget: (will fail if wget is not installed)"
wget http://www.antigrain.com/compositing.ppm
cp ../art/compositing.ppm .

spheres.ppm:
@echo "Required file missing!!"
@echo "Please download http://www.antigrain.com/spheres.ppm to /examples/X11/"
@echo "Attempting to retrieve file: (will fail if wget is not installed)"
wget http://www.antigrain.com/spheres.ppm
cp ../art/spheres.ppm .

shapes.txt:
@echo "Required file missing!!"
@echo "Please download http://www.antigrain.com/shapes.txt to /examples/X11/"
@echo "Attempting to retrieve file: (will fail if wget is not installed)"
wget http://www.antigrain.com/shapes.txt
cp ../art/shapes.txt .

1.sdf:
@echo "Required file missing!!"
@echo "Please download http://www.antigrain.com/1.sdf to /examples/macosx_carbon/"
@echo "Attempting to retrieve file: (will fail if wget is not installed)"
wget http://www.antigrain.com/1.sdf
cp ../art/1.sdf .

1.ppm:
@echo "Required file missing!!"
@echo "Please download http://www.antigrain.com/line_patterns.tar.gz to /examples/X11/ and decompress it"
@echo "Attempting to retrieve file: (will fail if wget is not installed)"
wget http://www.antigrain.com/line_patterns.tar.gz
cp ../art/line_patterns.tar.gz .
gunzip line_patterns.tar.gz
tar -xvf line_patterns.tar

timesi.ttf:
@echo "Required file missing!!"
@echo "Please download http://www.antigrain.com/timesi.zip to /examples/X11/ and decompress it"
@echo "Attempting to retrieve file: (will fail if wget is not installed)"
wget http://www.antigrain.com/timesi.zip
cp ../art/timesi.zip .
unzip -o timesi.zip

../freetype_test.o: ../freetype_test.cpp
Expand Down
33 changes: 33 additions & 0 deletions examples/X11/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ CXXFREETYPEFLAGS= $(AGGCXXFLAGS) -Wall \
-I../../include \
-I../../font_freetype \
-I/usr/local/include/freetype2 \
-I/usr/include/freetype2 \
-L../../src \
$(PIXFMT)

Expand Down Expand Up @@ -277,6 +278,38 @@ gpc_test: ../gpc_test.o ../make_arrows.o ../make_gb_poly.o $(PLATFORMSOURCES)
svg_test: ../svg_viewer/agg_svg_parser.o ../svg_viewer/agg_svg_path_renderer.o ../svg_viewer/agg_svg_path_tokenizer.o ../svg_viewer/svg_test.o $(PLATFORMSOURCES) tiger.svg
$(CXX) $(CXXFLAGS) ../svg_viewer/agg_svg_parser.o ../svg_viewer/agg_svg_path_renderer.o ../svg_viewer/agg_svg_path_tokenizer.o ../svg_viewer/svg_test.o $(PLATFORMSOURCES) -o svg_test $(LIBS) -lfreetype -lexpat

clean:
rm -f ../*.o
rm -f ../svg_viewer/*.o
rm -f ../../src/platform/$(PLATFORM)/agg_platform_support.o

agg.ppm:
cp ../art/agg.ppm .

compositing.ppm:
cp ../art/compositing.ppm .

spheres.ppm:
cp ../art/spheres.ppm .

shapes.txt:
cp ../art/shapes.txt .

1.sdf:
cp ../art/1.sdf .

1.ppm:
cp ../art/line_patterns.tar.gz .
gunzip line_patterns.tar.gz
tar -xvf line_patterns.tar

timesi.ttf:
cp ../art/timesi.zip .
unzip -o timesi.zip

tiger.svg:
cp ../art/tiger.svg .

../freetype_test.o: ../freetype_test.cpp
@echo \< $*.cpp \>
$(CXX) -c $(CXXFREETYPEFLAGS) $*.cpp -o $@
Expand Down
Binary file added examples/X11/line_patterns.tar.gz
Binary file not shown.
731 changes: 731 additions & 0 deletions examples/X11/tiger.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/agg2d_demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ int agg_main(int argc, char* argv[])
if(strcmp(img_name, "spheres") == 0)
{
sprintf(buf, "File not found: %s%s. Download http://www.antigrain.com/%s%s\n"
"or copy it from another directory if available.",
"or copy it from the ../art directory.",
img_name, app.img_ext(), img_name, app.img_ext());
}
else
Expand Down
2 changes: 1 addition & 1 deletion examples/compositing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ int agg_main(int argc, char* argv[])
if(strcmp(img_name, "compositing") == 0)
{
sprintf(buf, "File not found: %s%s. Download http://www.antigrain.com/%s%s\n"
"or copy it from another directory if available.",
"or copy it from the ../art directory.",
img_name, app.img_ext(), img_name, app.img_ext());
}
else
Expand Down
2 changes: 1 addition & 1 deletion examples/distortions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ int agg_main(int argc, char* argv[])
if(strcmp(img_name, "spheres") == 0)
{
sprintf(buf, "File not found: %s%s. Download http://www.antigrain.com/%s%s\n"
"or copy it from another directory if available.",
"or copy it from the ../art directory.",
img_name, app.img_ext(), img_name, app.img_ext());
}
else
Expand Down
4 changes: 2 additions & 2 deletions examples/flash_rasterizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -535,8 +535,8 @@ int agg_main(int argc, char* argv[])
char buf[256];
if(strcmp(fname, "shapes.txt") == 0)
{
sprintf(buf, "File not found: %s. Download http://www.antigrain.com/%s\n"
"or copy it from another directory if available.",
sprintf(buf, "File not found: %s%s. Download http://www.antigrain.com/%s%s\n"
"or copy it from the ../art directory.",
fname, fname);
}
else
Expand Down
4 changes: 2 additions & 2 deletions examples/flash_rasterizer2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -509,8 +509,8 @@ int agg_main(int argc, char* argv[])
char buf[256];
if(strcmp(fname, "shapes.txt") == 0)
{
sprintf(buf, "File not found: %s. Download http://www.antigrain.com/%s\n"
"or copy it from another directory if available.",
sprintf(buf, "File not found: %s%s. Download http://www.antigrain.com/%s%s\n"
"or copy it from the ../art directory.",
fname, fname);
}
else
Expand Down
2 changes: 1 addition & 1 deletion examples/freetype_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ class the_application : public agg::platform_support
else
{
message("Please copy file timesi.ttf to the current directory\n"
"or download it from http://www.antigrain.com/timesi.zip");
"or unzip it from ../art/timesi.zip");
}

return num_glyphs;
Expand Down
2 changes: 1 addition & 1 deletion examples/image1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ int agg_main(int argc, char* argv[])
if(strcmp(img_name, "spheres") == 0)
{
sprintf(buf, "File not found: %s%s. Download http://www.antigrain.com/%s%s\n"
"or copy it from another directory if available.",
"or copy it from the ../art directory.",
img_name, app.img_ext(), img_name, app.img_ext());
}
else
Expand Down
2 changes: 1 addition & 1 deletion examples/image_alpha.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ int agg_main(int argc, char* argv[])
if(strcmp(img_name, "spheres") == 0)
{
sprintf(buf, "File not found: %s%s. Download http://www.antigrain.com/%s%s\n"
"or copy it from another directory if available.",
"or copy it from the ../art directory.",
img_name, app.img_ext(), img_name, app.img_ext());
}
else
Expand Down
2 changes: 1 addition & 1 deletion examples/image_filters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ int agg_main(int argc, char* argv[])
if(strcmp(img_name, "spheres") == 0)
{
sprintf(buf, "File not found: %s%s. Download http://www.antigrain.com/%s%s\n"
"or copy it from another directory if available.",
"or copy it from the ../art directory.",
img_name, app.img_ext(), img_name, app.img_ext());
}
else
Expand Down
2 changes: 1 addition & 1 deletion examples/image_perspective.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ int agg_main(int argc, char* argv[])
if(strcmp(img_name, "spheres") == 0)
{
sprintf(buf, "File not found: %s%s. Download http://www.antigrain.com/%s%s\n"
"or copy it from another directory if available.",
"or copy it from the ../art directory.",
img_name, app.img_ext(), img_name, app.img_ext());
}
else
Expand Down
2 changes: 1 addition & 1 deletion examples/image_resample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ int agg_main(int argc, char* argv[])
if(strcmp(img_name, "spheres") == 0)
{
sprintf(buf, "File not found: %s%s. Download http://www.antigrain.com/%s%s\n"
"or copy it from another directory if available.",
"or copy it from the ../art directory.",
img_name, app.img_ext(), img_name, app.img_ext());
}
else
Expand Down
2 changes: 1 addition & 1 deletion examples/image_transforms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ int agg_main(int argc, char* argv[])
if(strcmp(img_name, "spheres") == 0)
{
sprintf(buf, "File not found: %s%s. Download http://www.antigrain.com/%s%s\n"
"or copy it from another directory if available.",
"or copy it from the ../art directory.",
img_name, app.img_ext(), img_name, app.img_ext());
}
else
Expand Down
6 changes: 3 additions & 3 deletions examples/line_patterns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,10 +316,10 @@ int agg_main(int argc, char* argv[])
{
char buf[256];
sprintf(buf, "There must be files 1%s...9%s\n"
"Download and unzip:\n"
"http://www.antigrain.com/line_patterns.bmp.zip\n"
"Copy and unzip:\n"
"../art/line_patterns.bmp.zip\n"
"or\n"
"http://www.antigrain.com/line_patterns.ppm.tar.gz\n",
"../art/line_patterns.ppm.tar.gz\n",
app.img_ext(), app.img_ext());
app.message(buf);
return 1;
Expand Down
25 changes: 5 additions & 20 deletions examples/macosx_carbon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -251,34 +251,19 @@ clean:
rm -f ../../src/platform/$(PLATFORM)/agg_mac_pmap.o

agg.bmp:
@echo "Required file missing!!"
@echo "Please download http://www.antigrain.com/agg.bmp to /examples/macosx_carbon/"
@echo "Attempting to retrieve via curl: (will fail if curl is not installed)"
curl -O http://www.antigrain.com/agg.bmp
cp ../art/agg.bmp .

compositing.bmp:
@echo "Required file missing!!"
@echo "Please download http://www.antigrain.com/compositing.bmp to /examples/macosx_carbon/"
@echo "Attempting to retrieve via curl: (will fail if curl is not installed)"
curl -O http://www.antigrain.com/compositing.bmp
cp ../art/compositing.bmp .

spheres.bmp:
@echo "Required file missing!!"
@echo "Please download http://www.antigrain.com/spheres.bmp to /examples/macosx_carbon/"
@echo "Attempting to retrieve file: (will fail if curl is not installed)"
curl -O http://www.antigrain.com/spheres.bmp
cp ../art/spheres.bmp .

1.sdf:
@echo "Required file missing!!"
@echo "Please download http://www.antigrain.com/1.sdf to /examples/macosx_carbon/"
@echo "Attempting to retrieve file: (will fail if curl is not installed)"
curl -O http://www.antigrain.com/1.sdf
cp ../art/1.sdf .

1.bmp:
@echo "Required file missing!!"
@echo "Please download http://www.antigrain.com/line_patterns.bmp.zip to /examples/macosx_carbon/ and decoompress it"
@echo "Attempting to retrieve file: (will fail if curl is not installed)"
curl -O http://www.antigrain.com/line_patterns.bmp.zip
cp ../art/line_patterns.bmp.zip .
unzip -o line_patterns.bmp.zip

%.app:
Expand Down
48 changes: 48 additions & 0 deletions examples/macosx_sdl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -338,3 +338,51 @@ clean:
rm -f trans_curve1_ft
rm -f trans_curve2_ft
rm -f gpc_test

agg.bmp:
cp ../art/agg.bmp .

compositing.bmp:
cp ../art/compositing.bmp .

spheres.bmp:
cp ../art/spheres.bmp .

1.sdf:
cp ../art/1.sdf .

1.bmp:
cp ../art/line_patterns.bmp.zip .
unzip -o line_patterns.bmp.zip

timesi.ttf:
cp ../art/timesi.zip .
unzip -o timesi.zip

../freetype_test.o: ../freetype_test.cpp
@echo \< $*.cpp \>
$(CXX) -c $(CXXFREETYPEFLAGS) $*.cpp -o $@

../trans_curve1_ft.o: ../trans_curve1_ft.cpp
@echo \< $*.cpp \>
$(CXX) -c $(CXXFREETYPEFLAGS) $*.cpp -o $@

../trans_curve2_ft.o: ../trans_curve2_ft.cpp
@echo \< $*.cpp \>
$(CXX) -c $(CXXFREETYPEFLAGS) $*.cpp -o $@

../../font_freetype/agg_font_freetype.o: ../../font_freetype/agg_font_freetype.cpp
@echo \< $*.cpp \>
$(CXX) -c $(CXXFREETYPEFLAGS) $*.cpp -o $@

../gpc_test.o: ../gpc_test.cpp
@echo \< $*.cpp \>
$(CXX) -c $(CXXFLAGS) -I../../gpc $*.cpp -o $@

%.o: %.cpp
@echo \< $*.cpp \>
$(CXX) -c $(CXXFLAGS) $*.cpp -o $@

.PHONY : clean


7 changes: 4 additions & 3 deletions examples/mol_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ unsigned trim_cr_lf(char* buf)
--len;
++pos;
}
if(pos) strcpy(buf, buf + pos);
// Note that strcpy has undefined behavior if the strings overlap
if(pos) memmove(buf, buf + pos, len);

// Trim "\n\r" at the end
while(len && (buf[len-1] == '\n' || buf[len-1] == '\r')) --len;
Expand Down Expand Up @@ -202,7 +203,7 @@ bool molecule::read(FILE* fd)
unsigned len;
if(!fgets(buf, 510, fd)) return false;
len = trim_cr_lf(buf);
if(len > 128) len = 128;
if(len > 127) len = 127;

if(len) memcpy(m_name, buf, len);
m_name[len] = 0;
Expand Down Expand Up @@ -800,7 +801,7 @@ class the_application : public agg::platform_support
else
{
char buf[256];
sprintf(buf, "File not found: '%s'. Download http://www.antigrain.com/%s\n",
sprintf(buf, "File not found: '%s'. Copy from ../art/%s\n",
fname, fname);
message(buf);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/pattern_perspective.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ int agg_main(int argc, char* argv[])
if(strcmp(img_name, "agg") == 0)
{
sprintf(buf, "File not found: %s%s. Download http://www.antigrain.com/%s%s\n"
"or copy it from another directory if available.",
"or copy it from the ../art directory.",
img_name, app.img_ext(), img_name, app.img_ext());
}
else
Expand Down
2 changes: 1 addition & 1 deletion examples/pattern_resample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ int agg_main(int argc, char* argv[])
if(strcmp(img_name, "agg") == 0)
{
sprintf(buf, "File not found: %s%s. Download http://www.antigrain.com/%s%s\n"
"or copy it from another directory if available.",
"or copy it from the ../art directory.",
img_name, app.img_ext(), img_name, app.img_ext());
}
else
Expand Down
2 changes: 1 addition & 1 deletion examples/svg_viewer/svg_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ int agg_main(int argc, char* argv[])
if(fd == 0)
{
app.message("Usage: svg_test <svg_file>\n"
"Download http://antigrain.com/svg/tiger.svg");
"Copy ../art/tiger.svg");
return 1;
}
fclose(fd);
Expand Down
2 changes: 1 addition & 1 deletion examples/trans_curve1_ft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class the_application : public agg::platform_support
else
{
message("Please copy file timesi.ttf to the current directory\n"
"or download it from http://www.antigrain.com/timesi.zip");
"or unzip it from ../art/timesi.zip");
}


Expand Down
Loading

0 comments on commit c8a3826

Please sign in to comment.