├── Makefile.am
├── src
├── tsukasa.ico
├── bitmaps
│ ├── b_.bmp
│ ├── b_.cur
│ ├── c_.bmp
│ ├── l_.bmp
│ ├── m_.bmp
│ ├── n_.bmp
│ ├── p_.bmp
│ ├── s_.bmp
│ ├── add_.bmp
│ ├── arr_.bmp
│ ├── arr_1.bmp
│ ├── del_.bmp
│ ├── help.bmp
│ ├── help_.bmp
│ ├── new_.bmp
│ ├── nut_.bmp
│ ├── rot_.bmp
│ ├── src_.bmp
│ ├── check_.bmp
│ ├── pan_bg.bmp
│ ├── pan_shp.bmp
│ ├── sc_rot_.bmp
│ ├── assdraw3.bmp
│ ├── del_cross.bmp
│ ├── pan_both.bmp
│ ├── pan_shape.bmp
│ ├── preview_.bmp
│ ├── transform.bmp
│ ├── uncheck_.bmp
│ └── Copy of assdraw3.bmp
├── xpm
│ ├── Makefile.am
│ ├── add__xpm.xpm
│ ├── b__xpm.xpm
│ ├── c__xpm.xpm
│ ├── l__xpm.xpm
│ ├── m__xpm.xpm
│ ├── n__xpm.xpm
│ ├── p__xpm.xpm
│ ├── s__xpm.xpm
│ ├── src__xpm.xpm
│ ├── uncheck__xpm.xpm
│ ├── check__xpm.xpm
│ ├── help__xpm.xpm
│ ├── res.cpp
│ ├── res.h
│ ├── arr__xpm.xpm
│ ├── arr_1_xpm.xpm
│ ├── pan_shp_xpm.xpm
│ ├── help_xpm.xpm
│ ├── pan_shape_xpm.xpm
│ ├── nut__xpm.xpm
│ ├── new__xpm.xpm
│ ├── del__xpm.xpm
│ ├── pan_bg_xpm.xpm
│ ├── preview__xpm.xpm
│ ├── pan_both_xpm.xpm
│ ├── rot__xpm.xpm
│ ├── del_cross_xpm.xpm
│ ├── sc_rot__xpm.xpm
│ └── appico_xpm.xpm
├── wxAGG
│ ├── Makefile.am
│ ├── AGGWindow.h
│ ├── AGGWindow.cpp
│ └── PixelFormatConvertor.h
├── convert.bat
├── _common.hpp
├── agghelper.hpp
├── resource.h
├── Makefile.am
├── t-stringifier.pl
├── agg_conv_bcspline.h
├── canvas_mouse.cpp
├── agg_vcgen_bcspline.h
├── ASSDraw3.layout
├── canvas_mouse.hpp
├── agg_bcspline.h
├── library.hpp
├── enums.hpp
├── assdraw.rc
├── cmd.hpp
├── dlgctrl.hpp
├── settings.hpp
├── include_once.hpp
├── Makefile.win
├── ASSDraw3.dev
├── assdraw.hpp
├── cmd.cpp
├── agg_vcgen_bcspline.cpp
├── assdraw_settings.cpp
├── agg_bcspline.cpp
├── library.cpp
├── canvas.hpp
└── settings.cpp
├── osx-bundle.sh
├── configure.in
└── assdraw_2008.vcproj
/Makefile.am:
--------------------------------------------------------------------------------
1 | SUBDIRS = src
2 |
--------------------------------------------------------------------------------
/src/tsukasa.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aegisub/assdraw/HEAD/src/tsukasa.ico
--------------------------------------------------------------------------------
/src/bitmaps/b_.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aegisub/assdraw/HEAD/src/bitmaps/b_.bmp
--------------------------------------------------------------------------------
/src/bitmaps/b_.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aegisub/assdraw/HEAD/src/bitmaps/b_.cur
--------------------------------------------------------------------------------
/src/bitmaps/c_.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aegisub/assdraw/HEAD/src/bitmaps/c_.bmp
--------------------------------------------------------------------------------
/src/bitmaps/l_.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aegisub/assdraw/HEAD/src/bitmaps/l_.bmp
--------------------------------------------------------------------------------
/src/bitmaps/m_.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aegisub/assdraw/HEAD/src/bitmaps/m_.bmp
--------------------------------------------------------------------------------
/src/bitmaps/n_.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aegisub/assdraw/HEAD/src/bitmaps/n_.bmp
--------------------------------------------------------------------------------
/src/bitmaps/p_.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aegisub/assdraw/HEAD/src/bitmaps/p_.bmp
--------------------------------------------------------------------------------
/src/bitmaps/s_.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aegisub/assdraw/HEAD/src/bitmaps/s_.bmp
--------------------------------------------------------------------------------
/src/bitmaps/add_.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aegisub/assdraw/HEAD/src/bitmaps/add_.bmp
--------------------------------------------------------------------------------
/src/bitmaps/arr_.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aegisub/assdraw/HEAD/src/bitmaps/arr_.bmp
--------------------------------------------------------------------------------
/src/bitmaps/arr_1.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aegisub/assdraw/HEAD/src/bitmaps/arr_1.bmp
--------------------------------------------------------------------------------
/src/bitmaps/del_.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aegisub/assdraw/HEAD/src/bitmaps/del_.bmp
--------------------------------------------------------------------------------
/src/bitmaps/help.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aegisub/assdraw/HEAD/src/bitmaps/help.bmp
--------------------------------------------------------------------------------
/src/bitmaps/help_.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aegisub/assdraw/HEAD/src/bitmaps/help_.bmp
--------------------------------------------------------------------------------
/src/bitmaps/new_.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aegisub/assdraw/HEAD/src/bitmaps/new_.bmp
--------------------------------------------------------------------------------
/src/bitmaps/nut_.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aegisub/assdraw/HEAD/src/bitmaps/nut_.bmp
--------------------------------------------------------------------------------
/src/bitmaps/rot_.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aegisub/assdraw/HEAD/src/bitmaps/rot_.bmp
--------------------------------------------------------------------------------
/src/bitmaps/src_.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aegisub/assdraw/HEAD/src/bitmaps/src_.bmp
--------------------------------------------------------------------------------
/src/bitmaps/check_.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aegisub/assdraw/HEAD/src/bitmaps/check_.bmp
--------------------------------------------------------------------------------
/src/bitmaps/pan_bg.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aegisub/assdraw/HEAD/src/bitmaps/pan_bg.bmp
--------------------------------------------------------------------------------
/src/bitmaps/pan_shp.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aegisub/assdraw/HEAD/src/bitmaps/pan_shp.bmp
--------------------------------------------------------------------------------
/src/bitmaps/sc_rot_.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aegisub/assdraw/HEAD/src/bitmaps/sc_rot_.bmp
--------------------------------------------------------------------------------
/src/xpm/Makefile.am:
--------------------------------------------------------------------------------
1 | noinst_LIBRARIES = libres.a
2 |
3 | libres_a_SOURCES = res.cpp res.h
4 |
5 |
--------------------------------------------------------------------------------
/src/bitmaps/assdraw3.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aegisub/assdraw/HEAD/src/bitmaps/assdraw3.bmp
--------------------------------------------------------------------------------
/src/bitmaps/del_cross.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aegisub/assdraw/HEAD/src/bitmaps/del_cross.bmp
--------------------------------------------------------------------------------
/src/bitmaps/pan_both.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aegisub/assdraw/HEAD/src/bitmaps/pan_both.bmp
--------------------------------------------------------------------------------
/src/bitmaps/pan_shape.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aegisub/assdraw/HEAD/src/bitmaps/pan_shape.bmp
--------------------------------------------------------------------------------
/src/bitmaps/preview_.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aegisub/assdraw/HEAD/src/bitmaps/preview_.bmp
--------------------------------------------------------------------------------
/src/bitmaps/transform.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aegisub/assdraw/HEAD/src/bitmaps/transform.bmp
--------------------------------------------------------------------------------
/src/bitmaps/uncheck_.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aegisub/assdraw/HEAD/src/bitmaps/uncheck_.bmp
--------------------------------------------------------------------------------
/src/bitmaps/Copy of assdraw3.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aegisub/assdraw/HEAD/src/bitmaps/Copy of assdraw3.bmp
--------------------------------------------------------------------------------
/src/wxAGG/Makefile.am:
--------------------------------------------------------------------------------
1 | AM_CXXFLAGS = @WX_CPPFLAGS@ @LIBAGG_CFLAGS@
2 |
3 | noinst_LIBRARIES = libaggwindow.a
4 |
5 | libaggwindow_a_SOURCES = \
6 | AGGWindow.cpp \
7 | AGGWindow.h \
8 | PixelFormatConvertor.h
9 |
--------------------------------------------------------------------------------
/src/convert.bat:
--------------------------------------------------------------------------------
1 | perl t-stringifier.pl agg_bcspline.h agg_conv_bcspline.h agg_vcgen_bcspline.h resource.h agg_bcspline.cpp agg_vcgen_bcspline.cpp assdraw.cpp assdraw_settings.cpp canvas.cpp canvas_mouse.cpp cmd.cpp dlgctrl.cpp engine.cpp library.cpp settings.cpp
2 | pause
--------------------------------------------------------------------------------
/src/_common.hpp:
--------------------------------------------------------------------------------
1 |
2 | #include "wx/wxprec.h"
3 |
4 | #ifdef __BORLANDC__
5 | #pragma hdrstop
6 | #endif
7 |
8 | #ifndef WX_PRECOMP
9 | #include "wx/wx.h"
10 | #endif
11 |
12 | #define TITLE wxT("ASSDraw3")
13 |
14 | #define __DPDS__ wxDefaultPosition, wxDefaultSize
15 |
--------------------------------------------------------------------------------
/src/agghelper.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "agg_path_storage.h"
4 |
5 | class agghelper
6 | {
7 | public:
8 |
9 | static agg::path_storage RectanglePath(double left, double right, double top, double bottom)
10 | {
11 | agg::path_storage path;
12 | path.move_to(left,top);
13 | path.line_to(right,top);
14 | path.line_to(right,bottom);
15 | path.line_to(left,bottom);
16 | path.line_to(left,top);
17 | return path;
18 | }
19 |
20 | };
21 |
--------------------------------------------------------------------------------
/src/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by assdraw.rc
4 | //
5 |
6 | // Next default values for new objects
7 | //
8 | #ifdef APSTUDIO_INVOKED
9 | #ifndef APSTUDIO_READONLY_SYMBOLS
10 | #define _APS_NEXT_RESOURCE_VALUE 105
11 | #define _APS_NEXT_COMMAND_VALUE 40001
12 | #define _APS_NEXT_CONTROL_VALUE 1000
13 | #define _APS_NEXT_SYMED_VALUE 101
14 | #endif
15 | #endif
16 |
--------------------------------------------------------------------------------
/src/xpm/add__xpm.xpm:
--------------------------------------------------------------------------------
1 | /* XPM */
2 | const char *add_xpm[] = {
3 | /* columns rows colors chars-per-pixel */
4 | "16 15 3 1",
5 | " c black",
6 | ". c #99999999FFFF",
7 | "X c None",
8 | /* pixels */
9 | "XXXXX XXXXX",
10 | "XXXXX .... XXXXX",
11 | "XXXXX .... XXXXX",
12 | "XXXXX .... XXXXX",
13 | "X .... X",
14 | "X ............ X",
15 | "X ............ X",
16 | "X ............ X",
17 | "X ............ X",
18 | "X .... X",
19 | "XXXXX .... XXXXX",
20 | "XXXXX .... XXXXX",
21 | "XXXXX .... XXXXX",
22 | "XXXXX XXXXX",
23 | "XXXXXXXXXXXXXXXX"
24 | };
25 |
--------------------------------------------------------------------------------
/src/xpm/b__xpm.xpm:
--------------------------------------------------------------------------------
1 | /* XPM */
2 | const char *b__xpm[] = {
3 | /* columns rows colors chars-per-pixel */
4 | "16 15 3 1",
5 | " c gray20",
6 | ". c #12120000FFFF",
7 | "X c None",
8 | /* pixels */
9 | "XX.XXXXXXXXXXXXX",
10 | "XX.XXXXXXXXXXXXX",
11 | ".....XXXXXXXXXXX",
12 | "XX.XXXXXXXXXXXXX",
13 | "XX.XX XXXX",
14 | "XXXXX XXX",
15 | "XXXXX XXXX XXX",
16 | "XXXXX XXXX XXX",
17 | "XXXXX XXXX",
18 | "XXXXX XXX",
19 | "XXXXX XXXX XXX",
20 | "XXXXX XXXX XXX",
21 | "XXXXX XXX",
22 | "XXXXX XXXX",
23 | "XXXXXXXXXXXXXXXX"
24 | };
25 |
--------------------------------------------------------------------------------
/src/xpm/c__xpm.xpm:
--------------------------------------------------------------------------------
1 | /* XPM */
2 | const char *c__xpm[] = {
3 | /* columns rows colors chars-per-pixel */
4 | "16 15 3 1",
5 | " c gray20",
6 | ". c #12120000FFFF",
7 | "X c None",
8 | /* pixels */
9 | "XX.XXXXXXXXXXXXX",
10 | "XX.XXXXXXXXXXXXX",
11 | ".....XXXXXXXXXXX",
12 | "XX.XXXXXXXXXXXXX",
13 | "XX.XXXX XXXXX",
14 | "XXXXXX XXXX",
15 | "XXXXX XX XXX",
16 | "XXXXX XXXX XXXX",
17 | "XXXXX XXXXXXXXX",
18 | "XXXXX XXXXXXXXX",
19 | "XXXXX XXXX XXXX",
20 | "XXXXX XX XXX",
21 | "XXXXXX XXXX",
22 | "XXXXXXX XXXXX",
23 | "XXXXXXXXXXXXXXXX"
24 | };
25 |
--------------------------------------------------------------------------------
/src/xpm/l__xpm.xpm:
--------------------------------------------------------------------------------
1 | /* XPM */
2 | const char *l__xpm[] = {
3 | /* columns rows colors chars-per-pixel */
4 | "16 15 3 1",
5 | " c gray20",
6 | ". c #12120000FFFF",
7 | "X c None",
8 | /* pixels */
9 | "XX.XXXXXXXXXXXXX",
10 | "XX.XXXXXXXXXXXXX",
11 | ".....XXXXXXXXXXX",
12 | "XX.XXXXXXXXXXXXX",
13 | "XX.XX XXXXXXXXX",
14 | "XXXXX XXXXXXXXX",
15 | "XXXXX XXXXXXXXX",
16 | "XXXXX XXXXXXXXX",
17 | "XXXXX XXXXXXXXX",
18 | "XXXXX XXXXXXXXX",
19 | "XXXXX XXXXXXXXX",
20 | "XXXXX XXXXXXXXX",
21 | "XXXXX XXXX",
22 | "XXXXX XXXX",
23 | "XXXXXXXXXXXXXXXX"
24 | };
25 |
--------------------------------------------------------------------------------
/src/xpm/m__xpm.xpm:
--------------------------------------------------------------------------------
1 | /* XPM */
2 | const char *m__xpm[] = {
3 | /* columns rows colors chars-per-pixel */
4 | "16 15 3 1",
5 | " c gray20",
6 | ". c #12120000FFFF",
7 | "X c None",
8 | /* pixels */
9 | "XX.XXXXXXXXXXXXX",
10 | "XX.XXXXXXXXXXXXX",
11 | ".....XXXXXXXXXXX",
12 | "XX.XXXXXXXXXXXXX",
13 | "XX.XXXXXXXXXXXXX",
14 | "XXXXX XXX XX",
15 | "XXXXX XXX XX",
16 | "XXXXX X XX",
17 | "XXXXX X XX",
18 | "XXXXX X X X XX",
19 | "XXXXX X X X XX",
20 | "XXXXX X X XX",
21 | "XXXXX X X XX",
22 | "XXXXX XX XX XX",
23 | "XXXXXXXXXXXXXXXX"
24 | };
25 |
--------------------------------------------------------------------------------
/src/xpm/n__xpm.xpm:
--------------------------------------------------------------------------------
1 | /* XPM */
2 | const char *n__xpm[] = {
3 | /* columns rows colors chars-per-pixel */
4 | "16 15 3 1",
5 | " c gray20",
6 | ". c #12120000FFFF",
7 | "X c None",
8 | /* pixels */
9 | "XX.XXXXXXXXXXXXX",
10 | "XX.XXXXXXXXXXXXX",
11 | ".....XXXXXXXXXXX",
12 | "XX.XXXXXXXXXXXXX",
13 | "XX.XX XXXX XXX",
14 | "XXXXX XXX XXX",
15 | "XXXXX XX XXX",
16 | "XXXXX XX XXX",
17 | "XXXXX X X XXX",
18 | "XXXXX X X XXX",
19 | "XXXXX XX XXX",
20 | "XXXXX XX XXX",
21 | "XXXXX XXX XXX",
22 | "XXXXX XXXX XXX",
23 | "XXXXXXXXXXXXXXXX"
24 | };
25 |
--------------------------------------------------------------------------------
/src/xpm/p__xpm.xpm:
--------------------------------------------------------------------------------
1 | /* XPM */
2 | const char *p__xpm[] = {
3 | /* columns rows colors chars-per-pixel */
4 | "16 15 3 1",
5 | " c gray20",
6 | ". c #12120000FFFF",
7 | "X c None",
8 | /* pixels */
9 | "XX.XXXXXXXXXXXXX",
10 | "XX.XXXXXXXXXXXXX",
11 | ".....XXXXXXXXXXX",
12 | "XX.XXXXXXXXXXXXX",
13 | "XX.XX XXXXX",
14 | "XXXXX XXXX",
15 | "XXXXX XXX XXXX",
16 | "XXXXX XXX XXXX",
17 | "XXXXX XXXX",
18 | "XXXXX XXXXX",
19 | "XXXXX XXXXXXXXX",
20 | "XXXXX XXXXXXXXX",
21 | "XXXXX XXXXXXXXX",
22 | "XXXXX XXXXXXXXX",
23 | "XXXXXXXXXXXXXXXX"
24 | };
25 |
--------------------------------------------------------------------------------
/src/xpm/s__xpm.xpm:
--------------------------------------------------------------------------------
1 | /* XPM */
2 | const char *s__xpm[] = {
3 | /* columns rows colors chars-per-pixel */
4 | "16 15 3 1",
5 | " c gray20",
6 | ". c #12120000FFFF",
7 | "X c None",
8 | /* pixels */
9 | "XX.XXXXXXXXXXXXX",
10 | "XX.XXXXXXXXXXXXX",
11 | ".....XXXXXXXXXXX",
12 | "XX.XXXXXXXXXXXXX",
13 | "XX.XXX XXXXX",
14 | "XXXXX XXXX",
15 | "XXXXX XXX XXXX",
16 | "XXXXX XXXXXXXXX",
17 | "XXXXX XXXXX",
18 | "XXXXXX XXXX",
19 | "XXXXXXXXXX XXXX",
20 | "XXXXX XXX XXXX",
21 | "XXXXX XXXX",
22 | "XXXXXX XXXXX",
23 | "XXXXXXXXXXXXXXXX"
24 | };
25 |
--------------------------------------------------------------------------------
/src/xpm/src__xpm.xpm:
--------------------------------------------------------------------------------
1 | /* XPM */
2 | const char *src__xpm[] = {
3 | /* columns rows colors chars-per-pixel */
4 | "16 15 4 1",
5 | " c black",
6 | ". c #0000BFBFBFBF",
7 | "X c cyan",
8 | "o c None",
9 | /* pixels */
10 | "oooooo ooooooo",
11 | "ooo oo . oo oooo",
12 | "oo X o o X ooo",
13 | "o X. XXX .. oo",
14 | "oo XX..... ooo",
15 | "ooo X. .. oooo",
16 | " X. ooo .. o",
17 | " X .. ooo X. . o",
18 | " .. ooo X. o",
19 | "ooo .. X. oooo",
20 | "oo ...XX.. ooo",
21 | "o X. ... .. oo",
22 | "oo . o o . ooo",
23 | "ooo oo . oo oooo",
24 | "oooooo ooooooo"
25 | };
26 |
--------------------------------------------------------------------------------
/src/xpm/uncheck__xpm.xpm:
--------------------------------------------------------------------------------
1 | /* XPM */
2 | const char *uncheck_xpm[] = {
3 | /* columns rows colors chars-per-pixel */
4 | "16 15 5 1",
5 | " c gray25",
6 | ". c #808080808080",
7 | "X c #D4D4D0D0C8C8",
8 | "o c gray100",
9 | "O c None",
10 | /* pixels */
11 | "OOOOOOOOOOOOOOOO",
12 | "OO............OO",
13 | "OO. XOO",
14 | "OO. oooooooooXOO",
15 | "OO. oooooooooXOO",
16 | "OO. oooooooooXOO",
17 | "OO. oooooooooXOO",
18 | "OO. oooooooooXOO",
19 | "OO. oooooooooXOO",
20 | "OO. oooooooooXOO",
21 | "OO. oooooooooXOO",
22 | "OO. oooooooooXOO",
23 | "OO.XXXXXXXXXXXOO",
24 | "OOOOOOOOOOOOOOOO",
25 | "OOOOOOOOOOOOOOOO"
26 | };
27 |
--------------------------------------------------------------------------------
/src/xpm/check__xpm.xpm:
--------------------------------------------------------------------------------
1 | /* XPM */
2 | const char *check_xpm[] = {
3 | /* columns rows colors chars-per-pixel */
4 | "16 15 6 1",
5 | " c black",
6 | ". c gray25",
7 | "X c #808080808080",
8 | "o c #D4D4D0D0C8C8",
9 | "O c gray100",
10 | "+ c None",
11 | /* pixels */
12 | "++++++++++++++++",
13 | "++XXXXXXXXXXXX++",
14 | "++X..........o++",
15 | "++X.OOOOOOOOOo++",
16 | "++X.OOOOOOO Oo++",
17 | "++X.OOOOOO Oo++",
18 | "++X.O OOO Oo++",
19 | "++X.O O OOo++",
20 | "++X.O OOOo++",
21 | "++X.OO OOOOo++",
22 | "++X.OOO OOOOOo++",
23 | "++X.OOOOOOOOOo++",
24 | "++Xooooooooooo++",
25 | "++++++++++++++++",
26 | "++++++++++++++++"
27 | };
28 |
--------------------------------------------------------------------------------
/src/xpm/help__xpm.xpm:
--------------------------------------------------------------------------------
1 | /* XPM */
2 | const char *help__xpm[] = {
3 | /* columns rows colors chars-per-pixel */
4 | "16 15 11 1",
5 | " c #46464B4B5C5C",
6 | ". c #FFFFCCCC0000",
7 | "X c #FAFAF3F30000",
8 | "o c #FBFBE2E24949",
9 | "O c #4C4C2D2D9B9B",
10 | "+ c #7A7A7E7E8D8D",
11 | "@ c #59594F4FBFBF",
12 | "# c #65655B5BEFEF",
13 | "$ c #FFFFFFFFABAB",
14 | "% c #82829494F7F7",
15 | "& c None",
16 | /* pixels */
17 | "&&&&++++++++&&&&",
18 | "&&++XXXXXXXo &&",
19 | "&+XX$$@@@@$$X. &",
20 | "&+X$$@@%#@@$$X +",
21 | "+X$$$@#$$@@$$$o ",
22 | "+X$$$$$$%@O$$$X ",
23 | "+X$$$$$%@O$$$$X ",
24 | "+X$$$$$@O$$$$$o ",
25 | "+X$$$$$$$$$$$Xo ",
26 | "+oX$$$$@@$$$$X. ",
27 | "&+XX$$$@@$$XX. &",
28 | "&& oXX$$$$Xo. &&",
29 | "&&& oXXXo &&&",
30 | "&&&&&& &&&&&",
31 | "&&&&&&&&&&&&&&&&"
32 | };
33 |
--------------------------------------------------------------------------------
/src/xpm/res.cpp:
--------------------------------------------------------------------------------
1 | #define static
2 | #include "appico_xpm.xpm"
3 | #include "add__xpm.xpm"
4 | #include "arr_1_xpm.xpm"
5 | #include "arr__xpm.xpm"
6 | #include "assdraw3_xpm.xpm"
7 | #include "b__xpm.xpm"
8 | #include "c__xpm.xpm"
9 | #include "check__xpm.xpm"
10 | #include "del__xpm.xpm"
11 | #include "del_cross_xpm.xpm"
12 | #include "help__xpm.xpm"
13 | #include "help_xpm.xpm"
14 | #include "l__xpm.xpm"
15 | #include "m__xpm.xpm"
16 | #include "n__xpm.xpm"
17 | #include "new__xpm.xpm"
18 | #include "nut__xpm.xpm"
19 | #include "p__xpm.xpm"
20 | #include "pan_bg_xpm.xpm"
21 | #include "pan_both_xpm.xpm"
22 | #include "pan_shape_xpm.xpm"
23 | #include "pan_shp_xpm.xpm"
24 | #include "preview__xpm.xpm"
25 | #include "rot__xpm.xpm"
26 | #include "s__xpm.xpm"
27 | #include "sc_rot__xpm.xpm"
28 | #include "src__xpm.xpm"
29 | #include "transform_xpm.xpm"
30 | #include "uncheck__xpm.xpm"
31 |
--------------------------------------------------------------------------------
/src/xpm/res.h:
--------------------------------------------------------------------------------
1 | extern char *appico_xpm[];
2 | extern char *add_xpm[];
3 | extern char *arr___xpm[];
4 | extern char *arr__xpm[];
5 | extern char *assdraw3__xpm[];
6 | extern char *b__xpm[];
7 | extern char *c__xpm[];
8 | extern char *check_xpm[];
9 | extern char *del__xpm[];
10 | extern char *delcross_xpm[];
11 | extern char *help__xpm[];
12 | extern char *help_xpm[];
13 | extern char *l__xpm[];
14 | extern char *m__xpm[];
15 | extern char *n__xpm[];
16 | extern char *new__xpm[];
17 | extern char *nut__xpm[];
18 | extern char *p__xpm[];
19 | extern char *pan_bg_xpm[];
20 | extern char *pan_both_xpm[];
21 | extern char *pan_shape_xpm[];
22 | extern char *pan_shp_xpm[];
23 | extern char *preview__xpm[];
24 | extern char *rot__xpm[];
25 | extern char *s__xpm[];
26 | extern char *sc_rot__xpm[];
27 | extern char *src__xpm[];
28 | extern char *transform_xpm[];
29 | extern char *uncheck_xpm[];
30 |
--------------------------------------------------------------------------------
/src/Makefile.am:
--------------------------------------------------------------------------------
1 | SUFFIXES = .cpp
2 |
3 | SUBDIRS = wxAGG xpm
4 |
5 | AM_CXXFLAGS = @WX_CPPFLAGS@ @LIBAGG_CFLAGS@
6 |
7 | bin_PROGRAMS = assdraw
8 | #assdraw_CPPFLAGS =
9 | assdraw_LDFLAGS = @WX_LIBS@ @LIBAGG_LIBS@
10 | assdraw_LDADD = wxAGG/libaggwindow.a xpm/libres.a
11 |
12 | assdraw_SOURCES = \
13 | agg_bcspline.cpp \
14 | agg_vcgen_bcspline.cpp \
15 | assdraw.cpp \
16 | assdraw_settings.cpp \
17 | canvas.cpp \
18 | canvas_mouse.cpp \
19 | cmd.cpp \
20 | dlgctrl.cpp \
21 | engine.cpp \
22 | library.cpp \
23 | settings.cpp
24 |
25 | assdraw_SOURCES += \
26 | agg_bcspline.h \
27 | agg_conv_bcspline.h \
28 | agg_vcgen_bcspline.h \
29 | resource.h
30 |
31 | EXTRA_DIST = \
32 | _common.hpp \
33 | agghelper.hpp
34 | assdraw.hpp \
35 | canvas.hpp \
36 | canvas_mouse.hpp \
37 | cmd.hpp \
38 | dlgctrl.hpp \
39 | engine.hpp \
40 | enums.hpp \
41 | include_once.hpp \
42 | library.hpp \
43 | settings.hpp
44 |
--------------------------------------------------------------------------------
/osx-bundle.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | set -e
4 |
5 | BUNDLE_ROOT="$(dirname $0)/Assdraw.app/"
6 | SRC_DIR="$(dirname $0)"
7 |
8 | if test -d "${BUNDLE_ROOT}"; then
9 | rm -rf "${BUNDLE_ROOT}"
10 | fi
11 |
12 | mkdir -p "${BUNDLE_ROOT}/Contents/MacOS"
13 |
14 | cp "${SRC_DIR}/src/assdraw" "${BUNDLE_ROOT}/Contents/MacOS/assdraw"
15 |
16 | python ../../aegisub/tools/osx-fix-libs.py "${BUNDLE_ROOT}/Contents/MacOS/assdraw"
17 |
18 | cat << 'EOF' > "${BUNDLE_ROOT}/Info.plist"
19 |
20 |
21 |
22 |
23 | CFBundleInfoDictionaryVersion
24 | 6.0
25 | CFBundleDevelopmentRegion
26 | English
27 | CFBundleExecutable
28 | assdraw
29 | CFBundleIdentifier
30 | com.aegisub.assdraw
31 | CFBundleName
32 | ASSDraw3
33 | CFBundleDisplayName
34 | ASSDraw3
35 | CFBundlePackageType
36 | APPL
37 | LSHasLocalizedDisplayName
38 |
39 |
40 |
41 | EOF
42 |
--------------------------------------------------------------------------------
/src/xpm/arr__xpm.xpm:
--------------------------------------------------------------------------------
1 | /* XPM */
2 | const char *arr__xpm[] = {
3 | /* columns rows colors chars-per-pixel */
4 | "16 15 43 1",
5 | " c black",
6 | ". c gray1",
7 | "X c gray2",
8 | "o c gray9",
9 | "O c #282828282828",
10 | "+ c #2A2A2A2A2A2A",
11 | "@ c #3A3A3A3A3A3A",
12 | "# c #3C3C3C3C3C3C",
13 | "$ c #494949494949",
14 | "% c gray35",
15 | "& c #747473737373",
16 | "* c #777777777777",
17 | "= c #888887878787",
18 | "- c #8F8F8E8E8E8E",
19 | "; c gray60",
20 | ": c #9D9D9D9D9D9D",
21 | "> c #A2A29F9F9F9F",
22 | ", c #B6B6B6B6B6B6",
23 | "< c gray74",
24 | "1 c #C5C5C5C5C5C5",
25 | "2 c #C9C9C9C9CACA",
26 | "3 c gray80",
27 | "4 c #CDCDCDCDCDCD",
28 | "5 c #CECECECECECE",
29 | "6 c #D0D0D0D0D0D0",
30 | "7 c #D1D1D1D1D0D0",
31 | "8 c gray82",
32 | "9 c gray83",
33 | "0 c #D7D7D7D7D6D6",
34 | "q c #D7D7D7D7D7D7",
35 | "w c gainsboro",
36 | "e c #DFDFDFDFDFDF",
37 | "r c #E2E2E2E2E2E2",
38 | "t c gray90",
39 | "y c #E6E6E6E6E6E6",
40 | "u c #EAEAEAEAEAEA",
41 | "i c #ECECECECECEC",
42 | "p c gray93",
43 | "a c #F2F2F3F3F2F2",
44 | "s c #F9F9F9F9F9F9",
45 | "d c gray99",
46 | "f c gray100",
47 | "g c None",
48 | /* pixels */
49 | "ggggyggggggggggg",
50 | "gggg-9gggggggggg",
51 | "gggg- 8ggggggggg",
52 | "gggg-0 5gggggggg",
53 | "gggg-f,#5ggggggg",
54 | "gggg-fs* 5gggggg",
55 | "gggg-dp,* 4ggggg",
56 | "gggg-ae2>* 5gggg",
57 | "gggg-t7X uggg",
58 | "gggg-0% X193gggg",
59 | "gggg-$<@ &gggggg",
60 | "gggg-6w: oqggggg",
61 | "ggggiggrO =ggggg",
62 | "gggggggw;.+pgggg",
63 | "ggggggggt +ugggg"
64 | };
65 |
--------------------------------------------------------------------------------
/src/xpm/arr_1_xpm.xpm:
--------------------------------------------------------------------------------
1 | /* XPM */
2 | const char *arr___xpm[] = {
3 | /* columns rows colors chars-per-pixel */
4 | "16 15 43 1",
5 | " c black",
6 | ". c gray1",
7 | "X c gray2",
8 | "o c gray9",
9 | "O c #282828282828",
10 | "+ c #2A2A2A2A2A2A",
11 | "@ c #3A3A3A3A3A3A",
12 | "# c #3C3C3C3C3C3C",
13 | "$ c #494949494949",
14 | "% c gray35",
15 | "& c #747473737373",
16 | "* c #777777777777",
17 | "= c #888887878787",
18 | "- c #8F8F8E8E8E8E",
19 | "; c gray60",
20 | ": c #9D9D9D9D9D9D",
21 | "> c #A2A29F9F9F9F",
22 | ", c #B6B6B6B6B6B6",
23 | "< c gray74",
24 | "1 c #C5C5C5C5C5C5",
25 | "2 c #C9C9C9C9CACA",
26 | "3 c gray80",
27 | "4 c #CDCDCDCDCDCD",
28 | "5 c #CECECECECECE",
29 | "6 c #D0D0D0D0D0D0",
30 | "7 c #D1D1D1D1D0D0",
31 | "8 c gray82",
32 | "9 c gray83",
33 | "0 c #D7D7D7D7D6D6",
34 | "q c #D7D7D7D7D7D7",
35 | "w c gainsboro",
36 | "e c #DFDFDFDFDFDF",
37 | "r c #E2E2E2E2E2E2",
38 | "t c gray90",
39 | "y c #E6E6E6E6E6E6",
40 | "u c #EAEAEAEAEAEA",
41 | "i c #ECECECECECEC",
42 | "p c gray93",
43 | "a c #F2F2F3F3F2F2",
44 | "s c #F9F9F9F9F9F9",
45 | "d c gray99",
46 | "f c gray100",
47 | "g c None",
48 | /* pixels */
49 | "ggggyggggggggggg",
50 | "gggg-9gggggggggg",
51 | "gggg- 8ggggggggg",
52 | "gggg-0 5gggggggg",
53 | "gggg-f,#5ggggggg",
54 | "gggg-fs* 5gggggg",
55 | "gggg-dp,* 4ggggg",
56 | "gggg-ae2>* 5gggg",
57 | "gggg-t7X uggg",
58 | "gggg-0% X193gggg",
59 | "gggg-$<@ &gggggg",
60 | "gggg-6w: oqggggg",
61 | "ggggiggrO =ggggg",
62 | "gggggggw;.+pgggg",
63 | "ggggggggt +ugggg"
64 | };
65 |
--------------------------------------------------------------------------------
/src/xpm/pan_shp_xpm.xpm:
--------------------------------------------------------------------------------
1 | /* XPM */
2 | const char *pan_shp_xpm[] = {
3 | /* columns rows colors chars-per-pixel */
4 | "24 15 36 1",
5 | " c #0D0D0D0D6767",
6 | ". c #131313136969",
7 | "X c #181818186C6C",
8 | "o c #1A1A1A1A6E6E",
9 | "O c #1E1E1E1E6F6F",
10 | "+ c #242424247272",
11 | "@ c #2A2A2A2A7575",
12 | "# c #303030307878",
13 | "$ c #363636367B7B",
14 | "% c #3C3C3C3C7E7E",
15 | "& c #606060606060",
16 | "* c #FFFF7F7F7F7F",
17 | "= c #424242428181",
18 | "- c #484848488484",
19 | "; c #5A5A5A5A8E8E",
20 | ": c #5F5F5F5F9090",
21 | "> c #656565659292",
22 | ", c #777777779B9B",
23 | "< c #7D7D7D7D9E9E",
24 | "1 c #7E7E7E7E9F9F",
25 | "2 c #A1A14949D3D3",
26 | "3 c #A6A64D4DD6D6",
27 | "4 c #A9A95050D7D7",
28 | "5 c #AAAA5151D8D8",
29 | "6 c #ACAC5353D9D9",
30 | "7 c #AFAF5656DADA",
31 | "8 c #B5B55C5CDDDD",
32 | "9 c #B8B85F5FDFDF",
33 | "0 c #83838383A1A1",
34 | "q c #8F8F8F8FA7A7",
35 | "w c #9B9B9B9BADAD",
36 | "e c #A1A1A1A1B0B0",
37 | "r c #A7A7A7A7B3B3",
38 | "t c #ADADADADB6B6",
39 | "y c #B9B9B9B9BCBC",
40 | "u c None",
41 | /* pixels */
42 | "uuuuu&uuuuuuuuuuuuuuuuuu",
43 | "uuuuu&uuuuuuuuuuuuuuuuuu",
44 | "uuuuu&uuuuuuuuuuuuuuuuuu",
45 | "uuuuu&uuuuuuuuwOX=;uu",
50 | "u&uuu&***&uuu,-99993@yuu",
51 | "u&&&&&&&&&uuuu;>998@wuuu",
52 | "u&uuuuuuu&uuuuu%09::uuuu",
53 | "u&uuuuuuu&uuuuuy@1@yuuuu",
54 | "u&uuuuuuu&uuuuuur euuuuu",
55 | "u&uuuuuuu&uuuuuuuuuuuuuu",
56 | "u&&&&&&&&&uuuuuuuuuuuuuu"
57 | };
58 |
--------------------------------------------------------------------------------
/src/t-stringifier.pl:
--------------------------------------------------------------------------------
1 | #!/usr/bin/perl
2 |
3 | ###########################
4 | # t-stringifier.pl - replaces "strings" with _T("strings")
5 | #
6 | # Usage: t-stringifier.pl file1 [file2 [file...]]
7 | # NOTE: changes existing files in place so backup stuff or rewrite the script
8 | # (more specifically comment out the rename() call at the end of the main loop)
9 | # if you're paranoid.
10 | #
11 | # Written by Karl Blomster 2008
12 | # This script is in the public domain.
13 | ###########################
14 |
15 |
16 | use warnings;
17 | use strict;
18 |
19 | my @infiles = @ARGV;
20 |
21 | foreach my $infile (@infiles) {
22 | my $outfile = $infile . ".out";
23 | open(INFILE, "<", $infile) or die("Couldn't open $infile for reading: $!");
24 | open(OUTFILE, ">", $outfile) or die("Couldn't open $outfile for writing: $!");
25 |
26 | print("Processing: $infile \n");
27 |
28 | while () {
29 | print OUTFILE $_ and next() if (m!^#\s*include!);
30 |
31 | my $line = $_;
32 |
33 | $line =~ s/(_T\(|_\(|wxT\()?"(.*?)(? c #52528282D0D0",
22 | ", c #63638E8ED5D5",
23 | "< c #69699292D7D7",
24 | "1 c #71719898D9D9",
25 | "2 c #79799E9EDBDB",
26 | "3 c #7C7CA0A0DCDC",
27 | "4 c #8989A9A9DFDF",
28 | "5 c #8C8CACACE0E0",
29 | "6 c #9595B2B2E3E3",
30 | "7 c #9A9AB6B6E4E4",
31 | "8 c #9B9BB7B7E5E5",
32 | "9 c #A6A6BFBFE8E8",
33 | "0 c #A8A8C0C0E8E8",
34 | "q c #ADADC4C4E9E9",
35 | "w c #B1B1C7C7EBEB",
36 | "e c #B8B8CCCCECEC",
37 | "r c #BEBED0D0EEEE",
38 | "t c #C4C4D5D5F0F0",
39 | "y c #CBCBD9D9F1F1",
40 | "u c #CCCCDADAF2F2",
41 | "i c #D2D2DFDFF4F4",
42 | "p c #D9D9E4E4F5F5",
43 | "a c #DCDCE6E6F6F6",
44 | "s c #DFDFE8E8F7F7",
45 | "d c #E2E2EAEAF8F8",
46 | "f c #EAEAF0F0FAFA",
47 | "g c #EDEDF2F2FBFB",
48 | "h c #F0F0F5F5FCFC",
49 | "j c #F5F5F8F8FDFD",
50 | "k c #F7F7F9F9FDFD",
51 | "l c #FAFAFCFCFEFE",
52 | "z c #FDFDFEFEFFFF",
53 | "x c gray100",
54 | "c c None",
55 | /* pixels */
56 | "ccc%%%%%%%o-cccc",
57 | "ccc%urw073%4-ccc",
58 | "ccc%iurw07%k4>cc",
59 | "cc9$$$<0w0%kk4$c",
60 | "c1 @2,O c #42424E4E9595",
22 | ", c #484854549797",
23 | "< c #4E4E59599999",
24 | "1 c #5A5A64649D9D",
25 | "2 c #66666F6FA2A2",
26 | "3 c #78787F7FA8A8",
27 | "4 c #39395050D3D3",
28 | "5 c #3C3C5252D4D4",
29 | "6 c #3F3F5555D5D5",
30 | "7 c #42425858D6D6",
31 | "8 c #45455A5AD7D7",
32 | "9 c #47475C5CD7D7",
33 | "0 c #4B4B6060D9D9",
34 | "q c #54546868DCDC",
35 | "w c #5A5A6D6DDEDE",
36 | "e c #5D5D7070DFDF",
37 | "r c #60607373E0E0",
38 | "t c #84848A8AACAC",
39 | "y c #8A8A8F8FAEAE",
40 | "u c #90909595B0B0",
41 | "i c #A2A2A5A5B6B6",
42 | "p c #A8A8AAAAB8B8",
43 | "a c #AEAEB0B0BABA",
44 | "s c #B4B4B5B5BCBC",
45 | "d c #BABABBBBBEBE",
46 | "f c None",
47 | /* pixels */
48 | "ffffOfffffffffffffffffffffffff",
49 | "ffff fffffffffffffffffffffffff",
50 | "ffff fffffffffffffffu%3fffffff",
51 | "ffff fffffffffffffi:=9,$3fffff",
52 | "X .fffffffa<&7rrrq,$3fff",
53 | " fff +++ fffffd2&4rrrrrrrq,$3f",
54 | " fff +++ fffft&1wrrrrrrrrrrq,=",
55 | " fff +++ fff#;qrrrrrrrrrrrrr5,",
56 | " fff +++ fff>6rrrrrrrrrrrq1@,p",
57 | " fffy-rrrrrrrrr8:$2aff",
58 | " fffffff fffd@wrrrrre4&-tfffff",
59 | " fffffff ffff,5rrrq1@ c #98984E4E4E4E",
22 | ", c #9A9A54545454",
23 | "< c #9D9D5A5A5A5A",
24 | "1 c #A1A165656565",
25 | "2 c #A3A36B6B6B6B",
26 | "3 c #A5A56F6F6F6F",
27 | "4 c #A5A571717171",
28 | "5 c #A7A777777777",
29 | "6 c #A9A97D7D7D7D",
30 | "7 c #0A0A1C1C8181",
31 | "8 c #0C0C1C1C8080",
32 | "9 c #0D0D1F1F8282",
33 | "0 c #151525258484",
34 | "q c #151525258585",
35 | "w c #171728288686",
36 | "e c #1F1F2F2F8888",
37 | "r c #242432328A8A",
38 | "t c #2A2A38388C8C",
39 | "y c #2D2D3B3B8D8D",
40 | "u c #61616A6A9F9F",
41 | "i c #64646C6CA0A0",
42 | "p c #74747C7CA6A6",
43 | "a c #77777E7EA7A7",
44 | "s c #AFAF8F8F8F8F",
45 | "d c #B3B39B9B9B9B",
46 | "f c #83838989ABAB",
47 | "g c #89898E8EADAD",
48 | "h c #8D8D9292AEAE",
49 | "j c #8F8F9494AFAF",
50 | "k c #9B9B9F9FB3B3",
51 | "l c #B5B5A1A1A1A1",
52 | "z c #B7B7A7A7A7A7",
53 | "x c #B9B9ADADADAD",
54 | "c c #A7A7A9A9B7B7",
55 | "v c #BBBBB3B3B3B3",
56 | "b c #B3B3B4B4BBBB",
57 | "n c #BDBDB9B9B9B9",
58 | "m c #B9B9BABABDBD",
59 | "M c None",
60 | /* pixels */
61 | "# @nMMMM",
62 | " MMMMebMMM:5MMMM",
63 | " MMMc9.MMMs=MMMM",
64 | " ......pMMM#xMMM",
65 | " h........0<1MMM",
66 | " Mc......tkd*MMM",
67 | " MMuX....bMM&lMM",
68 | " MMy.....jMM1d7.MM...fMM=sM",
71 | "z4*$,dMMa.wmM5:M",
72 | "MMMz2*$,dgqiMv#n",
73 | "MMMMMMz2*$o8MM;6",
74 | "MMMMMMMMMz2*$,3-",
75 | "MMMMMMMMMMMMz2%O"
76 | };
77 |
--------------------------------------------------------------------------------
/src/xpm/new__xpm.xpm:
--------------------------------------------------------------------------------
1 | /* XPM */
2 | const char *new__xpm[] = {
3 | /* columns rows colors chars-per-pixel */
4 | "16 15 64 1",
5 | " c black",
6 | ". c gray10",
7 | "X c #373737373737",
8 | "o c #434343434343",
9 | "O c #464646464646",
10 | "+ c #484848484848",
11 | "@ c #525251515050",
12 | "# c #565656565656",
13 | "$ c #595958585353",
14 | "% c #5F5F5F5F5F5F",
15 | "& c #606060606060",
16 | "* c gray38",
17 | "= c #676767676767",
18 | "- c DimGray",
19 | "; c #6A6A6A6A6A6A",
20 | ": c #6E6E6D6D6A6A",
21 | "> c gray43",
22 | ", c #6F6F6F6F6F6F",
23 | "< c gray44",
24 | "1 c #767676767676",
25 | "2 c #797979797979",
26 | "3 c #7C7C7C7C7C7C",
27 | "4 c #7F7F7F7F7F7F",
28 | "5 c #818181818181",
29 | "6 c #8D8D8D8D8D8D",
30 | "7 c #8E8E8E8E8E8E",
31 | "8 c #939393939393",
32 | "9 c gray58",
33 | "0 c #959595959595",
34 | "q c gray59",
35 | "w c gray60",
36 | "e c #9A9A9A9A9A9A",
37 | "r c #A4A4A1A19696",
38 | "t c #A8A8A6A69C9C",
39 | "y c #A7A7A7A7A7A7",
40 | "u c gray66",
41 | "i c #B1B1AFAFA5A5",
42 | "p c #B3B3B1B1A8A8",
43 | "a c #BDBDBBBBAFAF",
44 | "s c gray70",
45 | "d c #CDCDCACABCBC",
46 | "f c #C8C8C8C8C8C8",
47 | "g c #CACACACACACA",
48 | "h c #CDCDCDCDCDCD",
49 | "j c gray81",
50 | "k c gray83",
51 | "l c #D5D5D5D5D5D5",
52 | "z c #D7D7D7D7D7D7",
53 | "x c #D8D8D8D8D8D8",
54 | "c c gray86",
55 | "v c #DFDFDFDFDFDF",
56 | "b c #E7E7E4E4D3D3",
57 | "n c #E4E4E4E4E4E4",
58 | "m c #E7E7E7E7E7E7",
59 | "M c gray91",
60 | "N c gray92",
61 | "B c #EEEEEEEEEEEE",
62 | "V c #EFEFEFEFEFEF",
63 | "C c #F1F1F1F1F1F1",
64 | "Z c gray95",
65 | "A c #F3F3F3F3F3F3",
66 | "S c #F6F6F6F6F6F6",
67 | "D c gray100",
68 | "F c None",
69 | /* pixels */
70 | "FFFFFFFFFFFFFFFF",
71 | "FFFFFFFFFFFFFFFF",
72 | "FFFFFFFa@-------",
73 | "FFFFFFaOZBnzhf,;",
74 | "FFFFFaOZCmcjf<0$",
75 | "FFFFaOZANvkf9755>%+2q.rFF",
79 | "b;sxxxklf*6.rFFF",
80 | "p8SSSSSSu4.rFFFF",
81 | "1MDDDDDV&.rFFFFF",
82 | "ooooooo+ rFFFFFF",
83 | "FFFFFFFFFFFFFFFF",
84 | "FFFFFFFFFFFFFFFF"
85 | };
86 |
--------------------------------------------------------------------------------
/configure.in:
--------------------------------------------------------------------------------
1 | AC_PREREQ(2.61)
2 |
3 | #######
4 | # Setup
5 | #######
6 | AC_INIT([assdraw], [1.0.0])
7 | AC_CONFIG_SRCDIR([src/engine.cpp])
8 | AC_CONFIG_HEADER([config.h])
9 | AM_INIT_AUTOMAKE([foreign])
10 | AC_CANONICAL_HOST
11 | AC_CONFIG_MACRO_DIR([m4])
12 |
13 | ####################
14 | # Check for programs
15 | ####################
16 | AC_PROG_CC
17 | AC_PROG_CXX
18 | AC_LANG(C++)
19 | AC_PROG_LIBTOOL
20 | AC_PROG_INSTALL
21 | PKG_PROG_PKG_CONFIG([0.20])
22 |
23 | #################
24 | # Developers only
25 | #################
26 | AM_MAINTAINER_MODE
27 |
28 | AC_ARG_VAR([DEBUG_FLAGS], [Debug flag to use with --enable debug (default: -g)])
29 | if test -z "$DEBUG_FLAGS"; then
30 | DEBUG_FLAGS="-g";
31 | fi
32 |
33 | AC_MSG_CHECKING([whether to turn on debugging])
34 | AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging (default=no)])
35 | if test "$enable_debug" = "yes"; then
36 | AC_MSG_RESULT([yes ($DEBUG_FLAGS)])
37 | CPPFLAGS="$DEBUG_FLAGS $CPPFLAGS"
38 | else
39 | AC_MSG_RESULT([no])
40 | fi
41 |
42 | AC_ARG_ENABLE(build-dist)
43 | if test "$enable_build_dist" = "yes"; then
44 | SVN_VERSION=`svnversion .`
45 | PACKAGE_STRING="${PACKAGE_STRING}-r$SVN_VERSION"
46 | PACKAGE_VERSION="${PACKAGE_VERSION}-r$SVN_VERSION"
47 | VERSION="${VERSION}-r$SVN_VERSION"
48 | fi
49 |
50 | # Checks for header files.
51 |
52 | # Checks for typedefs, structures, and compiler characteristics.
53 | AM_OPTIONS_WXCONFIG
54 | AM_PATH_WXCONFIG(2.8.1, [have_wxconfig=1], [have_wxconfig=0], [std,gl,stc,aui, propgrid])
55 |
56 | if test "$have_wxconfig" != 1; then
57 | AC_MSG_FAILURE([
58 | wxWidgets detection failed, please set --with-wx* or add
59 | the libraries to your LDFLAGS, CXX/CFLAGS.
60 | ])
61 | fi
62 |
63 | PKG_CHECK_MODULES(LIBAGG, libagg >= 2.5.0, [with_libagg=yes], [with_libagg=no])
64 |
65 | if test "$with_libagg" != "yes"; then
66 | AC_MSG_FAILURE([You must have AGG installed: http://vector-agg.sourceforge.net/])
67 | fi
68 |
69 | AC_OUTPUT([
70 | Makefile
71 | src/wxAGG/Makefile
72 | src/xpm/Makefile
73 | src/Makefile
74 | ])
75 |
--------------------------------------------------------------------------------
/src/xpm/del__xpm.xpm:
--------------------------------------------------------------------------------
1 | /* XPM */
2 | const char *del__xpm[] = {
3 | /* columns rows colors chars-per-pixel */
4 | "16 15 69 1",
5 | " c black",
6 | ". c #0C0C0C0C0C0C",
7 | "X c gray5",
8 | "o c gray9",
9 | "O c #191919191919",
10 | "+ c gray11",
11 | "@ c #262625252424",
12 | "# c #313131313131",
13 | "$ c #323232323232",
14 | "% c #353534343232",
15 | "& c #373735353333",
16 | "* c #373737373737",
17 | "= c #383838383737",
18 | "- c #3E3E3E3E3E3E",
19 | "; c #414141414141",
20 | ": c #575755555252",
21 | "> c #555555555555",
22 | ", c #5D5D5A5A5757",
23 | "< c gray35",
24 | "1 c gray36",
25 | "2 c #646464646464",
26 | "3 c gray42",
27 | "4 c #70706E6E6A6A",
28 | "5 c #71716F6F6B6B",
29 | "6 c #818181818181",
30 | "7 c #868686868686",
31 | "8 c #878787878686",
32 | "9 c #888888888787",
33 | "0 c #8F8F8C8C8787",
34 | "q c gray55",
35 | "w c #8F8F8E8E8D8D",
36 | "e c #979793938D8D",
37 | "r c gray57",
38 | "t c #969695959292",
39 | "y c gray59",
40 | "u c #9F9F9F9F9F9F",
41 | "i c #A3A39F9F9999",
42 | "p c #A0A0A0A0A0A0",
43 | "a c gray64",
44 | "s c #AAAAA6A6A0A0",
45 | "d c #AEAEACACA7A7",
46 | "f c #A9A9A9A9A9A9",
47 | "g c #B1B1AEAEA7A7",
48 | "h c #B3B3B0B0A9A9",
49 | "j c #B7B7B4B4ADAD",
50 | "k c #B9B9B7B7B1B1",
51 | "l c #BEBEBBBBB5B5",
52 | "z c #BCBCBCBCBCBC",
53 | "x c #C2C2BFBFB8B8",
54 | "c c #C3C3C0C0B8B8",
55 | "v c #C3C3C0C0B9B9",
56 | "b c #C7C7C3C3BBBB",
57 | "n c #C6C6C3C3BCBC",
58 | "m c gray78",
59 | "M c #CBCBC8C8C0C0",
60 | "N c #CFCFCBCBC4C4",
61 | "B c #C8C8C8C8C8C8",
62 | "V c gray80",
63 | "C c #D2D2CECEC6C6",
64 | "Z c #D3D3CFCFC7C7",
65 | "A c #D0D0D0D0D0D0",
66 | "S c LightGray",
67 | "D c gray86",
68 | "F c #DDDDDDDDDDDD",
69 | "G c gray90",
70 | "H c gray93",
71 | "J c #F4F4F4F4F4F4",
72 | "K c #F6F6F6F6F6F6",
73 | "L c None",
74 | /* pixels */
75 | "LLLLN*LLLLLLLLLL",
76 | "LLLLk=0LLLLLLLLL",
77 | "LLLZt &LLLLLLLLL",
78 | "LLLv9<-iLLLLLLLL",
79 | "LLZtB1p%LL L",
80 | "LLlyH1F$eLLLLLLL",
81 | "LCwAH1Ff@cLLLLLL",
82 | "LdaJHuFS>5LLLLLL",
83 | "n8KJH FSm+sLLLLL",
84 | "LrqJHDFS3:xLLLLL",
85 | "Lb#DHGFzohLLLLLL",
86 | "LL46HGF2,LLLLLLL",
87 | "LLgOHGF LLLLLLLL",
88 | "LLX..X...LLLLLLL",
89 | "LLM;V7.XjLLLLLLL"
90 | };
91 |
--------------------------------------------------------------------------------
/src/agg_conv_bcspline.h:
--------------------------------------------------------------------------------
1 | //----------------------------------------------------------------------------
2 | // Anti-Grain Geometry (AGG) - Version 2.5
3 | // A high quality rendering engine for C++
4 | // Copyright (C) 2002-2006 Maxim Shemanarev
5 | // Contact: mcseem@antigrain.com
6 | // mcseemagg@yahoo.com
7 | // http://antigrain.com
8 | //
9 | // AGG is free software; you can redistribute it and/or
10 | // modify it under the terms of the GNU General Public License
11 | // as published by the Free Software Foundation; either version 2
12 | // of the License, or (at your option) any later version.
13 | //
14 | // AGG is distributed in the hope that it will be useful,
15 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | // GNU General Public License for more details.
18 | //
19 | // You should have received a copy of the GNU General Public License
20 | // along with AGG; if not, write to the Free Software
21 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
22 | // MA 02110-1301, USA.
23 | //----------------------------------------------------------------------------
24 |
25 | #ifndef AGG_conv_bcspline_INCLUDED
26 | #define AGG_conv_bcspline_INCLUDED
27 |
28 | #include "agg_basics.h"
29 | #include "agg_vcgen_bcspline.h"
30 | #include "agg_conv_adaptor_vcgen.h"
31 |
32 |
33 | namespace agg
34 | {
35 |
36 | //---------------------------------------------------------conv_bcspline
37 | template
38 | struct conv_bcspline : public conv_adaptor_vcgen
39 | {
40 | typedef conv_adaptor_vcgen base_type;
41 |
42 | conv_bcspline(VertexSource& vs) :
43 | conv_adaptor_vcgen(vs) {}
44 |
45 | void interpolation_step(double v) { base_type::generator().interpolation_step(v); }
46 | double interpolation_step() const { return base_type::generator().interpolation_step(); }
47 |
48 | private:
49 | conv_bcspline(const conv_bcspline&);
50 | const conv_bcspline&
51 | operator = (const conv_bcspline&);
52 | };
53 |
54 | }
55 |
56 |
57 | #endif
58 |
59 |
--------------------------------------------------------------------------------
/src/xpm/pan_bg_xpm.xpm:
--------------------------------------------------------------------------------
1 | /* XPM */
2 | const char *pan_bg_xpm[] = {
3 | /* columns rows colors chars-per-pixel */
4 | "24 15 66 1",
5 | " c #2A2A35354D4D",
6 | ". c #2C2C38384B4B",
7 | "X c #36364A4A6464",
8 | "o c #474757576E6E",
9 | "O c #4D4D5C5C7272",
10 | "+ c #5E5E66667171",
11 | "@ c #606060606060",
12 | "# c #C1C14B4B2B2B",
13 | "$ c #CFCF55553636",
14 | "% c #CBCB75752424",
15 | "& c #BABA6D6D6666",
16 | "* c #CCCC69695656",
17 | "= c #C9C973736666",
18 | "- c #FFFF7F7F7F7F",
19 | "; c #EDEDA0A04C4C",
20 | ": c #EFEFA5A54F4F",
21 | "> c #585866668585",
22 | ", c #646475759696",
23 | "< c #7D7D89899E9E",
24 | "1 c #72728383A7A7",
25 | "2 c #80808A8A9D9D",
26 | "3 c #86868E8E9D9D",
27 | "4 c #89899999AFAF",
28 | "5 c #8A8A9A9AAEAE",
29 | "6 c #81819292BABA",
30 | "7 c #9696A3A3B4B4",
31 | "8 c #9D9DA7A7BBBB",
32 | "9 c #A3A3ABABBABA",
33 | "0 c #D3D396968D8D",
34 | "q c #D2D297978D8D",
35 | "w c #DDDDA5A59B9B",
36 | "e c #E8E8C3C39393",
37 | "r c #83839999C7C7",
38 | "t c #9090A5A5C3C3",
39 | "y c #9191A5A5C3C3",
40 | "u c #9191A5A5C4C4",
41 | "i c #9292A6A6C5C5",
42 | "p c #9292A7A7C5C5",
43 | "a c #9191A5A5C6C6",
44 | "s c #9393A7A7C6C6",
45 | "d c #9393A7A7C7C7",
46 | "f c #9898A8A8C5C5",
47 | "g c #9898AAAAC5C5",
48 | "h c #9797A7A7C9C9",
49 | "j c #9595A8A8CFCF",
50 | "k c #9B9BB1B1DFDF",
51 | "l c #AAAAB4B4C7C7",
52 | "z c #D4D4C3C3D0D0",
53 | "x c #CDCDDADAE9E9",
54 | "c c #D2D2D8D8E2E2",
55 | "v c #D6D6DCDCE6E6",
56 | "b c #C8C8DADAFDFD",
57 | "n c #D2D2DDDDF0F0",
58 | "m c #D5D5DFDFF1F1",
59 | "M c #E1E1E5E5ECEC",
60 | "N c #F2F2E2E2E2E2",
61 | "B c #F5F5E5E5E2E2",
62 | "V c #F1F1E9E9ECEC",
63 | "C c #EBEBEFEFFBFB",
64 | "Z c #EFEFF5F5F9F9",
65 | "A c #F1F1F4F4FAFA",
66 | "S c #F2F2F5F5FCFC",
67 | "D c #FAFAFBFBFEFE",
68 | "F c #FDFDFEFEFEFE",
69 | "G c gray100",
70 | "H c None",
71 | /* pixels */
72 | "HHHHH@HHHHHHHHHHHHHHHHHH",
73 | "HHHHH@HHHHHHHHHHHHHHHHHH",
74 | "HHHHH@HHHHHHHHHHHHHHHHHH",
75 | "HHHHH@HHHHHHassdssyyygHH",
76 | "H@@@@@@@@@HHsGFGABw0VXHH",
77 | "H@HHH@---@HHiGGAAqe:&XHH",
78 | "H@HHH@---@HHsGGZZ=;%#XHH",
79 | "H@HHH@---@HHpGGvxN*$zXHH",
80 | "H@HHH@---@HHiGc4.XHH",
84 | "H@HHHHHHH@HHyXXXXXXXXXHH",
85 | "H@HHHHHHH@HHHHHHHHHHHHHH",
86 | "H@@@@@@@@@HHHHHHHHHHHHHH"
87 | };
88 |
--------------------------------------------------------------------------------
/src/canvas_mouse.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2007, ai-chan
3 | * All rights reserved.
4 | *
5 | * Redistribution and use in source and binary forms, with or without
6 | * modification, are permitted provided that the following conditions are met:
7 | * * Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * * Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | * * Neither the name of the ASSDraw3 Team nor the
13 | * names of its contributors may be used to endorse or promote products
14 | * derived from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED BY AI-CHAN ``AS IS'' AND ANY
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 | * DISCLAIMED. IN NO EVENT SHALL AI-CHAN BE LIABLE FOR ANY
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 | */
27 |
28 | #include "canvas_mouse.hpp"
29 | #include "canvas.hpp"
30 |
31 | DEFINE_EVENT_TYPE( wxEVT_MOUSEONCANVAS )
32 |
33 |
34 | ASSDrawMouseOnCanvasEvent::ASSDrawMouseOnCanvasEvent(const ASSDrawCanvas* canvas)
35 | : wxNotifyEvent(),
36 | _canvas(canvas)
37 | {
38 | _data = NULL;
39 | }
40 |
41 | wxEvent* ASSDrawMouseOnCanvasEvent::Clone()
42 | {
43 | ASSDrawMouseOnCanvasEvent *clone = new ASSDrawMouseOnCanvasEvent(_canvas);
44 | clone->SetData(_data);
45 | return clone;
46 | }
47 |
48 | void ASSDrawMouseOnCanvasEvent::SetData(MouseOnCanvasData *data)
49 | {
50 | _data = data;
51 | }
52 |
53 | MouseOnCanvasData* ASSDrawMouseOnCanvasEvent::GetData()
54 | {
55 | return _data;
56 | }
57 |
--------------------------------------------------------------------------------
/src/xpm/preview__xpm.xpm:
--------------------------------------------------------------------------------
1 | /* XPM */
2 | const char *preview__xpm[] = {
3 | /* columns rows colors chars-per-pixel */
4 | "16 15 79 1",
5 | " c gray20",
6 | ". c #353535353535",
7 | "X c gray21",
8 | "o c gray22",
9 | "O c gray23",
10 | "+ c #3C3C3C3C3C3C",
11 | "@ c #3E3E3E3E3E3E",
12 | "# c #3F3F3F3F3F3F",
13 | "$ c gray25",
14 | "% c #414141414141",
15 | "& c gray26",
16 | "* c #434343434343",
17 | "= c gray27",
18 | "- c #464646464646",
19 | "; c #484848484848",
20 | ": c #494949494949",
21 | "> c gray29",
22 | ", c #4B4B4B4B4B4B",
23 | "< c #4C4C4C4C4C4C",
24 | "1 c gray30",
25 | "2 c #505050505050",
26 | "3 c gray32",
27 | "4 c gray33",
28 | "5 c #555555555555",
29 | "6 c #565656565656",
30 | "7 c gray34",
31 | "8 c gray35",
32 | "9 c #5A5A5A5A5A5A",
33 | "0 c #5B5B5B5B5B5B",
34 | "q c #5D5D5D5D5D5D",
35 | "w c #676767676767",
36 | "e c #6D6D6D6D6D6D",
37 | "r c gray43",
38 | "t c #6F6F6F6F6F6F",
39 | "y c gray44",
40 | "u c #727272727272",
41 | "i c gray46",
42 | "p c #777777777777",
43 | "a c gray47",
44 | "s c #7B7B7B7B7B7B",
45 | "d c gray49",
46 | "f c #7E7E7E7E7E7E",
47 | "g c #808080808080",
48 | "h c #848484848484",
49 | "j c #898989898989",
50 | "k c gray54",
51 | "l c #8B8B8B8B8B8B",
52 | "z c gray55",
53 | "x c #8D8D8D8D8D8D",
54 | "c c #909090909090",
55 | "v c gray57",
56 | "b c gray58",
57 | "n c gray59",
58 | "m c #979797979797",
59 | "M c #9A9A9A9A9A9A",
60 | "N c #9B9B9B9B9B9B",
61 | "B c #9D9D9D9D9D9D",
62 | "V c #9F9F9F9F9F9F",
63 | "C c #A0A0A0A0A0A0",
64 | "Z c gray63",
65 | "A c gray64",
66 | "S c #A4A4A4A4A4A4",
67 | "D c #A5A5A5A5A5A5",
68 | "F c gray65",
69 | "G c #A7A7A7A7A7A7",
70 | "H c #A9A9A9A9A9A9",
71 | "J c gray67",
72 | "K c #ACACACACACAC",
73 | "L c gray68",
74 | "P c #AEAEAEAEAEAE",
75 | "I c #B4B4B4B4B4B4",
76 | "U c gray71",
77 | "Y c #B9B9B9B9B9B9",
78 | "T c gray73",
79 | "R c #BBBBBBBBBBBB",
80 | "E c gray74",
81 | "W c gray",
82 | "Q c gray75",
83 | "! c None",
84 | /* pixels */
85 | "!!!!!!!!d.6Q!!!!",
86 | "!!!!!!!coI4j!!!!",
87 | "!!!r,51%P!zq!E!!",
88 | "!!B*DCAW!!F@a$&S",
89 | "!!V:!!!!!!QguJk6",
90 | "!!!-m!!!!!!!!!k0",
91 | "!!!st!!!!!!!!sXG",
92 | "!!Y+n!!!!!!l*5K!",
93 | "!R=f!!!!!!x#N!!!",
94 | "!5t!!!!!!!wp!!!!",
95 | "N+!!!!!!!!HoM!!!",
96 | "8l!!!y5t!!!ZO!!!",
97 | "3n!!99G2h!!b!!L RU.B!!!",
99 | "!h>7T!!!i;=f!!!!"
100 | };
101 |
--------------------------------------------------------------------------------
/src/xpm/pan_both_xpm.xpm:
--------------------------------------------------------------------------------
1 | /* XPM */
2 | const char *pan_both_xpm[] = {
3 | /* columns rows colors chars-per-pixel */
4 | "24 15 76 1",
5 | " c #1B1B22225353",
6 | ". c #0D0D0D0D6767",
7 | "X c #0F0F14146161",
8 | "o c #111115156464",
9 | "O c #121219196262",
10 | "+ c #131313136969",
11 | "@ c #131314146C6C",
12 | "# c #111115156F6F",
13 | "$ c #19191A1A6E6E",
14 | "% c #1E1E1E1E6F6F",
15 | "& c #1D1D21217878",
16 | "* c #232330306262",
17 | "= c #282837376262",
18 | "- c #2A2A2A2A7575",
19 | "; c #3C3C3C3C7E7E",
20 | ": c #36364A4A6464",
21 | "> c #606060606060",
22 | ", c #C1C14B4B2B2B",
23 | "< c #CFCF55553636",
24 | "1 c #CBCB75752424",
25 | "2 c #BABA6D6D6666",
26 | "3 c #CCCC69695656",
27 | "4 c #C9C973736666",
28 | "5 c #FFFF7F7F7F7F",
29 | "6 c #EDEDA0A04C4C",
30 | "7 c #EFEFA5A54F4F",
31 | "8 c #484848488484",
32 | "9 c #5A5A5A5A8E8E",
33 | "0 c #45454B4B9696",
34 | "q c #5F5F5F5F9090",
35 | "w c #656565659292",
36 | "e c #777777779B9B",
37 | "r c #7E7E7E7E9F9F",
38 | "t c #B2B20000FFFF",
39 | "y c #7D7D89899E9E",
40 | "u c #7B7B8888B1B1",
41 | "i c #83838383A1A1",
42 | "p c #89899999AFAF",
43 | "a c #8A8A9A9AAEAE",
44 | "s c #9B9B9B9BADAD",
45 | "d c #9696A3A3B4B4",
46 | "f c #A1A1A1A1B0B0",
47 | "g c #A7A7A7A7B3B3",
48 | "h c #B9B9B9B9BCBC",
49 | "j c #D3D396968D8D",
50 | "k c #D2D297978D8D",
51 | "l c #DDDDA5A59B9B",
52 | "z c #E8E8C3C39393",
53 | "x c #9090A5A5C3C3",
54 | "c c #9191A5A5C3C3",
55 | "v c #9191A5A5C4C4",
56 | "b c #9292A6A6C5C5",
57 | "n c #9292A7A7C5C5",
58 | "m c #9191A5A5C6C6",
59 | "M c #9393A7A7C6C6",
60 | "N c #9393A7A7C7C7",
61 | "B c #9898AAAAC5C5",
62 | "V c #9595A8A8CFCF",
63 | "C c #AAAAB3B3D4D4",
64 | "Z c #D4D4C3C3D0D0",
65 | "A c #C0C0CACAE3E3",
66 | "S c #CDCDDADAE9E9",
67 | "D c #D2D2D8D8E2E2",
68 | "F c #D6D6DCDCE6E6",
69 | "G c #E1E1E5E5ECEC",
70 | "H c #F2F2E2E2E2E2",
71 | "J c #F5F5E5E5E2E2",
72 | "K c #F1F1E9E9ECEC",
73 | "L c #EBEBEFEFFBFB",
74 | "P c #EFEFF5F5F9F9",
75 | "I c #F1F1F4F4FAFA",
76 | "U c #F2F2F5F5FCFC",
77 | "Y c #FAFAFBFBFEFE",
78 | "T c #FDFDFEFEFEFE",
79 | "R c gray100",
80 | "E c None",
81 | /* pixels */
82 | "EEEEE>EEEEEmMMNMMcccBEEE",
83 | "EEEEE>EEEEEMRTRIJljK:EEE",
84 | "EEEEE>EEEEEbRRIIkz72:EEE",
85 | "EEEEE>EEEEEMRRPP461,:EEE",
86 | "E>>>>>>>>>EnRRFSH3EEE>555>EbRDpyu$@0*EEE",
88 | "E>EEE>555>EvGaUCott O%sE",
89 | "E>EEE>555>EvdYA&tttttt-f",
90 | "E>EEE>555>ExLV#tttttttt+",
91 | "E>>>>>>>>>Ec::=Xttttttw9",
92 | "E>EEEEEEE>EEEEEe8ttttt-h",
93 | "E>EEEEEEE>EEEEEE9wttt-sE",
94 | "E>EEEEEEE>EEEEEEE;itqqEE",
95 | "E>EEEEEEE>EEEEEEEh-r-hEE",
96 | "E>>>>>>>>>EEEEEEEEg.fEEE"
97 | };
98 |
--------------------------------------------------------------------------------
/src/xpm/rot__xpm.xpm:
--------------------------------------------------------------------------------
1 | /* XPM */
2 | const char *rot__xpm[] = {
3 | /* columns rows colors chars-per-pixel */
4 | "16 15 81 1",
5 | " c #62625858C4C4",
6 | ". c #62625959C4C4",
7 | "X c #64645A5AC4C4",
8 | "o c #65655B5BC4C4",
9 | "O c #65655B5BC5C5",
10 | "+ c #66665C5CC4C4",
11 | "@ c #66665D5DC5C5",
12 | "# c #67675D5DC5C5",
13 | "$ c #67675E5EC5C5",
14 | "% c #68685E5EC5C5",
15 | "& c #69695F5FC5C5",
16 | "* c #69696060C6C6",
17 | "= c #6A6A6161C6C6",
18 | "- c #6E6E6565C7C7",
19 | "; c #6F6F6767C7C7",
20 | ": c #73736A6AC7C7",
21 | "> c #77776E6EC7C7",
22 | ", c #73736A6AC8C8",
23 | "< c #73736B6BC8C8",
24 | "1 c #74746B6BC8C8",
25 | "2 c #76766D6DC8C8",
26 | "3 c #7D7D7474C9C9",
27 | "4 c #7E7E7575C9C9",
28 | "5 c #7E7E7676C9C9",
29 | "6 c #7E7E7676CBCB",
30 | "7 c #7F7F7676CBCB",
31 | "8 c #80807777CACA",
32 | "9 c #81817878CBCB",
33 | "0 c #81817979CDCD",
34 | "q c #82827A7ACCCC",
35 | "w c #87877F7FCCCC",
36 | "e c #88887F7FCCCC",
37 | "r c #88888080CDCD",
38 | "t c #8E8E8686CDCD",
39 | "y c #91918989CFCF",
40 | "u c #93938A8ACECE",
41 | "i c #92928A8ACFCF",
42 | "p c #96968E8ECECE",
43 | "a c #92928B8BD0D0",
44 | "s c #A1A19999D0D0",
45 | "d c #A3A39B9BD3D3",
46 | "f c #A4A49D9DD3D3",
47 | "g c #A5A59E9ED2D2",
48 | "h c #A7A79F9FD3D3",
49 | "j c #A3A39D9DD4D4",
50 | "k c #A4A49D9DD4D4",
51 | "l c #A6A69E9ED5D5",
52 | "z c #A7A7A0A0D4D4",
53 | "x c #ABABA4A4D2D2",
54 | "c c #A8A8A1A1D5D5",
55 | "v c #A9A9A2A2D4D4",
56 | "b c #AAAAA3A3D7D7",
57 | "n c #A7A7A0A0D8D8",
58 | "m c #B1B1ABABD5D5",
59 | "M c #B7B7B0B0D7D7",
60 | "N c #BABAB3B3D7D7",
61 | "B c #BBBBB5B5D5D5",
62 | "V c #BFBFB9B9D6D6",
63 | "C c #BFBFBABAD9D9",
64 | "Z c #C3C3BDBDDADA",
65 | "A c #C2C2BDBDDEDE",
66 | "S c #C4C4BFBFDCDC",
67 | "D c #C5C5C0C0DCDC",
68 | "F c #C7C7C2C2DEDE",
69 | "G c #C8C8C2C2DADA",
70 | "H c #CACAC5C5D8D8",
71 | "J c #C9C9C4C4DADA",
72 | "K c #CBCBC6C6DBDB",
73 | "L c #CCCCC7C7DFDF",
74 | "P c #D1D1CCCCDCDC",
75 | "I c #D4D4CFCFDEDE",
76 | "U c #D6D6D1D1DDDD",
77 | "Y c #D0D0CACAE1E1",
78 | "T c #D2D2CCCCE1E1",
79 | "R c #D4D4CFCFE0E0",
80 | "E c #D3D3CECEE4E4",
81 | "W c #D6D6D1D1E1E1",
82 | "Q c #D8D8D3D3E1E1",
83 | "! c #D8D8D2D2E3E3",
84 | "~ c #DBDBD7D7E5E5",
85 | "^ c None",
86 | /* pixels */
87 | "^^^^^^^^^^^^^^^^",
88 | "^^En0&+^^^^^^^^^",
89 | "^A9O ~^^^^^^^^",
90 | "TqO7bY^^^^^^!^^^",
91 | "c*6L^^^^^^^WkF^^",
92 | "rOl^^^^^^^WjpV^^^^^",
101 | "^^^^^^^^^^^^^^^^"
102 | };
103 |
--------------------------------------------------------------------------------
/src/wxAGG/AGGWindow.h:
--------------------------------------------------------------------------------
1 | #ifndef WX_AGG_WINDOW_H
2 | #define WX_AGG_WINDOW_H
3 |
4 | #include "PixelFormatConvertor.h"
5 |
6 | #include
7 | #include
8 | #include
9 | #include
10 |
11 | #include "agg_rendering_buffer.h"
12 |
13 | namespace GUI {
14 |
15 | /// A simple widget that displays a bitmap that AGG can draw on.
16 | /// It reallocates the bitmap so that it always is the current size of the
17 | /// entire panel and calls the virtual method draw() to draw to the bitmap.
18 | /// This should be useable anywhere a wxWindow can be, e.g. in actual windows,
19 | /// buttons, etc.
20 | class AGGWindow: public wxWindow {
21 | public:
22 | /// Create an AGGWindow. Defaults are taken from wxWindow::wxWindow(), see
23 | /// that documentation for more information.
24 | AGGWindow(wxWindow* parent, wxWindowID id = wxID_ANY,
25 | const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
26 | long style = wxTAB_TRAVERSAL);
27 |
28 | /// Clean up resources held
29 | virtual ~AGGWindow();
30 |
31 | protected:
32 |
33 | /// The conversion between wxWidgets' pixel format and AGG's pixel format
34 | typedef PixelFormatConvertor PixelFormat;
35 |
36 | /// The wxWidgets "pixel data" type, an accessor to the raw pixels
37 | typedef wxPixelData PixelData;
38 |
39 |
40 | /// Create the bitmap given the current size.
41 | void init(const int width, const int height);
42 |
43 | /// Attach the AGG rendering buffer to the bitmap and call the user draw() code.
44 | void attachAndDraw();
45 |
46 | /// Paint the bitmap onto the panel.
47 | void onPaint(wxPaintEvent& event);
48 |
49 | /// Resize the bitmap to match the window.
50 | void onSize(wxSizeEvent& event);
51 |
52 | /// Handle the erase-background event.
53 | void onEraseBackground(wxEraseEvent& event);
54 |
55 | /// Draw into the bitmap using AGG.
56 | virtual void draw() = 0;
57 |
58 |
59 | wxBitmap* bitmap; ///< wxWidgets bitmap for AGG to draw into
60 | wxMemoryDC memDC; ///< Memory "device context" for drawing the bitmap
61 |
62 | agg::rendering_buffer rBuf; ///< AGG's rendering buffer, pointing into the bitmap
63 |
64 | DECLARE_EVENT_TABLE() /// Allocate wxWidgets storage for event handlers
65 | };
66 | }
67 |
68 | #endif
69 |
--------------------------------------------------------------------------------
/src/xpm/del_cross_xpm.xpm:
--------------------------------------------------------------------------------
1 | /* XPM */
2 | const char *delcross_xpm[] = {
3 | /* columns rows colors chars-per-pixel */
4 | "16 15 85 1",
5 | " c #3F3F14141818",
6 | ". c #4C4C19192121",
7 | "X c #656522222626",
8 | "o c #797927272C2C",
9 | "O c #6E6E24243333",
10 | "+ c #82822A2A2D2D",
11 | "@ c #919130303434",
12 | "# c #949431313535",
13 | "$ c #979732323434",
14 | "% c #979732323B3B",
15 | "& c #9E9E35353D3D",
16 | "* c #9E9E34343F3F",
17 | "= c #A0A036363939",
18 | "- c #A5A538383C3C",
19 | "; c #A7A73A3A3E3E",
20 | ": c #ACAC3B3B3E3E",
21 | "> c #B5B53D3D3D3D",
22 | ", c #9E9E34344848",
23 | "< c #A5A539394242",
24 | "1 c #AEAE3D3D4040",
25 | "2 c #A3A337374D4D",
26 | "3 c #B7B73F3F4343",
27 | "4 c #B3B33F3F4747",
28 | "5 c #B5B53F3F4545",
29 | "6 c #B3B33C3C5353",
30 | "7 c #B1B13D3D5454",
31 | "8 c #B3B33C3C5656",
32 | "9 c #B5B53D3D5959",
33 | "0 c #B7B740404141",
34 | "q c #BDBD42424545",
35 | "w c #B7B741414848",
36 | "e c #B3B340405C5C",
37 | "r c #BFBF45455E5E",
38 | "t c #C3C345454C4C",
39 | "y c #D0D04B4B5252",
40 | "u c #C9C948486666",
41 | "i c #CFCF4B4B6868",
42 | "p c #D0D04C4C6A6A",
43 | "a c #D2D24C4C6C6C",
44 | "s c #E4E457577575",
45 | "d c #E2E258587676",
46 | "f c #E7E75B5B7979",
47 | "g c #EAEA5B5B7A7A",
48 | "h c #E8E85C5C7979",
49 | "j c #EAEA5C5C7A7A",
50 | "k c #F1F160607B7B",
51 | "l c #F1F162627F7F",
52 | "z c #F4F464648080",
53 | "x c #F6F666668080",
54 | "c c #F5F564648282",
55 | "v c #F7F766668585",
56 | "b c #FAFA69698484",
57 | "n c #FFFF6D6D8686",
58 | "m c #FCFC6B6B8888",
59 | "M c #FFFF6D6D8989",
60 | "N c #FFFF6F6F8B8B",
61 | "B c #FFFF71718989",
62 | "V c #FFFF74748F8F",
63 | "C c #FFFF83839B9B",
64 | "Z c #FFFF89899B9B",
65 | "A c #FFFF89899D9D",
66 | "S c #FFFF8D8DA2A2",
67 | "D c #FFFF9393A5A5",
68 | "F c #FFFF9595A6A6",
69 | "G c #FFFF9E9EA7A7",
70 | "H c #FFFFA6A6ABAB",
71 | "J c #FFFFA5A5B1B1",
72 | "K c #FFFFAFAFB1B1",
73 | "L c #FFFFADADB4B4",
74 | "P c #FFFFB0B0B2B2",
75 | "I c #FFFFB0B0B9B9",
76 | "U c #FFFFB5B5B8B8",
77 | "Y c #FFFFB4B4BCBC",
78 | "T c #FFFFBBBBBBBB",
79 | "R c #FFFFBCBCBBBB",
80 | "E c #FFFFB8B8BDBD",
81 | "W c #FFFFC0C0BEBE",
82 | "Q c #FFFFC0C0C2C2",
83 | "! c #FFFFC4C4C2C2",
84 | "~ c #FFFFC3C3C4C4",
85 | "^ c #FFFFC4C4C7C7",
86 | "/ c #FFFFC7C7C6C6",
87 | "( c #FFFFC7C7C7C7",
88 | ") c #FFFFCCCCC9C9",
89 | "_ c None",
90 | /* pixels */
91 | "_^jY____________",
92 | "_DqtJ________S__",
93 | "_Fh;5C_____Iym__",
94 | "__Eg10l___c4V___",
95 | "____Aw3vQN>M____",
96 | "_____~p-& vertex_storage;
50 |
51 | vcgen_bcspline();
52 |
53 | void interpolation_step(double v) { m_interpolation_step = v; }
54 | double interpolation_step() const { return m_interpolation_step; }
55 |
56 | // Vertex Generator Interface
57 | void remove_all();
58 | void add_vertex(double x, double y, unsigned cmd);
59 |
60 | // Vertex Source Interface
61 | void rewind(unsigned path_id);
62 | unsigned vertex(double* x, double* y);
63 |
64 | private:
65 | vcgen_bcspline(const vcgen_bcspline&);
66 | const vcgen_bcspline& operator = (const vcgen_bcspline&);
67 |
68 | vertex_storage m_src_vertices;
69 | bcspline m_spline_x;
70 | bcspline m_spline_y;
71 | double m_interpolation_step;
72 | unsigned m_closed;
73 | status_e m_status;
74 | unsigned m_src_vertex;
75 | double m_cur_abscissa;
76 | double m_max_abscissa;
77 | };
78 |
79 | }
80 |
81 |
82 | #endif
83 |
84 |
--------------------------------------------------------------------------------
/src/ASSDraw3.layout:
--------------------------------------------------------------------------------
1 | [Editor_10]
2 | CursorCol=32
3 | CursorRow=553
4 | TopLine=535
5 | LeftChar=1
6 | Open=1
7 | Top=0
8 | [Editor_7]
9 | CursorCol=6
10 | CursorRow=227
11 | TopLine=197
12 | LeftChar=1
13 | Open=1
14 | Top=1
15 | [Editor_5]
16 | CursorCol=11
17 | CursorRow=19
18 | TopLine=1
19 | LeftChar=1
20 | Open=1
21 | Top=0
22 | [Editor_18]
23 | CursorCol=11
24 | CursorRow=14
25 | TopLine=1
26 | LeftChar=1
27 | Open=0
28 | Top=0
29 | [Editor_19]
30 | CursorCol=12
31 | CursorRow=3
32 | TopLine=3
33 | LeftChar=1
34 | Open=0
35 | Top=0
36 | [Editor_11]
37 | CursorCol=8
38 | CursorRow=44
39 | TopLine=31
40 | LeftChar=1
41 | Open=0
42 | Top=0
43 | [Editor_3]
44 | CursorCol=1
45 | CursorRow=268
46 | TopLine=243
47 | LeftChar=1
48 | Open=1
49 | Top=0
50 | [Editor_15]
51 | CursorCol=15
52 | CursorRow=7
53 | TopLine=1
54 | LeftChar=1
55 | Open=1
56 | Top=0
57 | [Editor_8]
58 | CursorCol=1
59 | CursorRow=69
60 | TopLine=33
61 | LeftChar=1
62 | Open=0
63 | Top=0
64 | [Editor_16]
65 | CursorCol=2
66 | CursorRow=25
67 | TopLine=1
68 | LeftChar=1
69 | Open=0
70 | Top=0
71 | [Editor_0]
72 | CursorCol=39
73 | CursorRow=212
74 | TopLine=184
75 | LeftChar=1
76 | Open=1
77 | Top=0
78 | [Editors]
79 | Focused=7
80 | Order=5,0,10,17,3,6,7,22,21,20,15
81 | [Editor_1]
82 | Open=0
83 | Top=0
84 | CursorCol=21
85 | CursorRow=63
86 | TopLine=30
87 | LeftChar=1
88 | [Editor_2]
89 | Open=0
90 | Top=0
91 | CursorCol=7
92 | CursorRow=83
93 | TopLine=50
94 | LeftChar=1
95 | [Editor_4]
96 | Open=0
97 | Top=0
98 | CursorCol=19
99 | CursorRow=21
100 | TopLine=21
101 | LeftChar=1
102 | [Editor_6]
103 | Open=1
104 | Top=0
105 | CursorCol=1
106 | CursorRow=577
107 | TopLine=556
108 | LeftChar=1
109 | [Editor_9]
110 | Open=0
111 | Top=0
112 | CursorCol=1
113 | CursorRow=1
114 | TopLine=1
115 | LeftChar=1
116 | [Editor_12]
117 | Open=0
118 | Top=0
119 | CursorCol=6
120 | CursorRow=99
121 | TopLine=91
122 | LeftChar=1
123 | [Editor_13]
124 | Open=0
125 | Top=0
126 | CursorCol=1
127 | CursorRow=204
128 | TopLine=170
129 | LeftChar=1
130 | [Editor_14]
131 | Open=0
132 | Top=0
133 | CursorCol=1
134 | CursorRow=290
135 | TopLine=256
136 | LeftChar=1
137 | [Editor_17]
138 | Open=1
139 | Top=0
140 | CursorCol=68
141 | CursorRow=133
142 | TopLine=112
143 | LeftChar=1
144 | [Editor_20]
145 | Open=1
146 | Top=0
147 | CursorCol=46
148 | CursorRow=195
149 | TopLine=163
150 | LeftChar=1
151 | [Editor_21]
152 | Open=1
153 | Top=0
154 | CursorCol=2
155 | CursorRow=58
156 | TopLine=57
157 | LeftChar=1
158 | [Editor_22]
159 | Open=1
160 | Top=0
161 | CursorCol=32
162 | CursorRow=160
163 | TopLine=129
164 | LeftChar=1
165 | [Editor_23]
166 | Open=0
167 | Top=0
168 | CursorCol=2
169 | CursorRow=6
170 | TopLine=1
171 | LeftChar=1
172 | [Editor_24]
173 | CursorCol=1
174 | CursorRow=56
175 | TopLine=25
176 | LeftChar=1
177 | Open=0
178 | Top=0
179 | [Editor_25]
180 | Open=0
181 | Top=0
182 | CursorCol=18
183 | CursorRow=8
184 | TopLine=1
185 | LeftChar=1
186 |
--------------------------------------------------------------------------------
/src/canvas_mouse.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2007, ai-chan
3 | * All rights reserved.
4 | *
5 | * Redistribution and use in source and binary forms, with or without
6 | * modification, are permitted provided that the following conditions are met:
7 | * * Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * * Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | * * Neither the name of the ASSDraw3 Team nor the
13 | * names of its contributors may be used to endorse or promote products
14 | * derived from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED BY AI-CHAN ``AS IS'' AND ANY
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 | * DISCLAIMED. IN NO EVENT SHALL AI-CHAN BE LIABLE FOR ANY
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 | */
27 |
28 | #pragma once
29 |
30 | #include "_common.hpp"
31 | #include "enums.hpp"
32 | #include "engine.hpp"
33 |
34 | #include
35 |
36 | struct MouseOnCanvasData
37 | {
38 | MODE mode;
39 | wxMouseEvent event;
40 | enum { NONE, LEFT, RIGHT, BOTH } button;
41 |
42 | Point* mousedownAt_point;
43 | Point* pointedAt_point;
44 | Point* dblclicked_point_right;
45 |
46 | wxPoint mouse_point;
47 | wxPoint* dragAnchor_left;
48 | wxPoint* lastDrag_left;
49 | wxPoint* dragAnchor_right;
50 | wxPoint* lastDrag_right;
51 | };
52 |
53 | class ASSDrawCanvas;
54 |
55 | class ASSDrawMouseOnCanvasEvent : public wxNotifyEvent
56 | {
57 | public:
58 | ASSDrawMouseOnCanvasEvent(const ASSDrawCanvas* canvas);
59 |
60 | wxEvent* Clone();
61 |
62 | void SetData(MouseOnCanvasData *data);
63 |
64 | MouseOnCanvasData* GetData();
65 |
66 | private:
67 | const ASSDrawCanvas* _canvas;
68 | MouseOnCanvasData* _data;
69 |
70 | };
71 |
72 | DECLARE_EVENT_TYPE( wxEVT_MOUSEONCANVAS, -1 )
73 |
74 | typedef void (wxEvtHandler::*wxMouseOnCanvasEventFunction)(ASSDrawMouseOnCanvasEvent&);
75 |
76 | #define EVT_MOUSEONCANVAS(fn) \
77 | DECLARE_EVENT_TABLE_ENTRY( wxEVT_MOUSEONCANVAS, -1, -1, \
78 | (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) \
79 | wxStaticCastEvent( wxMouseOnCanvasEventFunction, & fn ), (wxObject *) NULL ),
80 |
81 | class ASSDrawMouseOnCanvasHandler
82 | {
83 |
84 |
85 | };
86 |
--------------------------------------------------------------------------------
/src/agg_bcspline.h:
--------------------------------------------------------------------------------
1 | //----------------------------------------------------------------------------
2 | // Anti-Grain Geometry (AGG) - Version 2.5
3 | // A high quality rendering engine for C++
4 | // Copyright (C) 2002-2006 Maxim Shemanarev
5 | // Contact: mcseem@antigrain.com
6 | // mcseemagg@yahoo.com
7 | // http://antigrain.com
8 | //
9 | // AGG is free software; you can redistribute it and/or
10 | // modify it under the terms of the GNU General Public License
11 | // as published by the Free Software Foundation; either version 2
12 | // of the License, or (at your option) any later version.
13 | //
14 | // AGG is distributed in the hope that it will be useful,
15 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | // GNU General Public License for more details.
18 | //
19 | // You should have received a copy of the GNU General Public License
20 | // along with AGG; if not, write to the Free Software
21 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
22 | // MA 02110-1301, USA.
23 | //----------------------------------------------------------------------------
24 |
25 | #ifndef AGG_bcspline_INCLUDED
26 | #define AGG_bcspline_INCLUDED
27 |
28 | #include "agg_array.h"
29 |
30 | namespace agg
31 | {
32 | //----------------------------------------------------------------bcspline
33 | // A very simple class of Bi-cubic Spline interpolation.
34 | // First call init(num, x[], y[]) where num - number of source points,
35 | // x, y - arrays of X and Y values respectively. Here Y must be a function
36 | // of X. It means that all the X-coordinates must be arranged in the ascending
37 | // order.
38 | // Then call get(x) that calculates a value Y for the respective X.
39 | // The class supports extrapolation, i.e. you can call get(x) where x is
40 | // outside the given with init() X-range. Extrapolation is a simple linear
41 | // function.
42 | //
43 | // See Implementation agg_bcspline.cpp
44 | //------------------------------------------------------------------------
45 | class bcspline
46 | {
47 | public:
48 | bcspline();
49 | bcspline(int num);
50 | bcspline(int num, const double* x, const double* y);
51 |
52 | void init(int num);
53 | void add_point(double x, double y);
54 | void prepare();
55 |
56 | void init(int num, const double* x, const double* y);
57 |
58 | double get(double x) const;
59 | double get_stateful(double x) const;
60 |
61 | private:
62 | bcspline(const bcspline&);
63 | const bcspline& operator = (const bcspline&);
64 |
65 | static void bsearch(int n, const double *x, double x0, int *i);
66 | double extrapolation_left(double x) const;
67 | double extrapolation_right(double x) const;
68 | double interpolation(double x, int i) const;
69 |
70 | int m_max;
71 | int m_num;
72 | double* m_x;
73 | double* m_y;
74 | pod_array m_am;
75 | mutable int m_last_idx;
76 | };
77 |
78 |
79 | }
80 |
81 | #endif
82 |
--------------------------------------------------------------------------------
/src/library.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2007, ai-chan
3 | * All rights reserved.
4 | *
5 | * Redistribution and use in source and binary forms, with or without
6 | * modification, are permitted provided that the following conditions are met:
7 | * * Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * * Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | * * Neither the name of the ASSDraw3 Team nor the
13 | * names of its contributors may be used to endorse or promote products
14 | * derived from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED BY AI-CHAN ``AS IS'' AND ANY
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 | * DISCLAIMED. IN NO EVENT SHALL AI-CHAN BE LIABLE FOR ANY
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 | */
27 |
28 | #pragma once
29 |
30 | #include "engine.hpp"
31 | #include
32 |
33 | class ASSDrawFrame;
34 | class ASSDrawShapeLibrary;
35 |
36 | enum LIBLAYOUT { VERTICAL, HORIZONTAL };
37 |
38 | enum {
39 | MENU_RANGE_START = 450,
40 | MENU_LOAD,
41 | MENU_COPYCLIPBOARD,
42 | MENU_SAVECANVAS,
43 | MENU_DELETE,
44 | MENU_RANGE_END,
45 | TOOL_SAVE,
46 | TOOL_CHECK,
47 | TOOL_UNCHECK,
48 | TOOL_DELETE
49 | };
50 |
51 | class ASSDrawShapePreview : public ASSDrawEngine
52 | {
53 | protected:
54 | ASSDrawShapePreview( wxWindow *parent, ASSDrawShapeLibrary *shapelib, wxString initialcmds = _T(""));
55 | virtual void OnSize(wxSizeEvent& event);
56 |
57 | ASSDrawShapeLibrary *shapelib;
58 | wxCheckBox *cb;
59 | DECLARE_EVENT_TABLE()
60 | friend class ASSDrawShapeLibrary;
61 | };
62 |
63 | class ASSDrawShapeLibrary : public wxScrolledWindow
64 | {
65 | public:
66 | ASSDrawShapeLibrary( wxWindow *parent, ASSDrawFrame *frame );
67 | virtual ASSDrawShapePreview* AddShapePreview(wxString cmds, bool addtotop = false);
68 | virtual void OnSize(wxSizeEvent& event);
69 | virtual void OnMouseLeftDClick(wxMouseEvent &event);
70 | virtual void OnMouseRightClick(wxMouseEvent &event);
71 | virtual void OnPopupMenuClicked(wxCommandEvent &event);
72 | virtual void SaveShapeFromCanvas(wxCommandEvent& WXUNUSED(event));
73 | virtual void CheckUncheckAllPreviews(wxCommandEvent &event);
74 | virtual void DeleteChecked(wxCommandEvent& WXUNUSED(event));
75 | virtual void UpdatePreviewDisplays();
76 | virtual std::vector< ASSDrawShapePreview *> GetShapePreviews();
77 | virtual void LoadToCanvas(ASSDrawShapePreview *preview);
78 |
79 | wxScrolledWindow* libarea;
80 | wxFlexGridSizer *libsizer;
81 | wxSizer* sizer;
82 | LIBLAYOUT layout;
83 | protected:
84 | ASSDrawFrame *m_frame;
85 | ASSDrawShapePreview *activepreview;
86 |
87 | DECLARE_EVENT_TABLE()
88 | };
89 |
--------------------------------------------------------------------------------
/src/enums.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2007, ai-chan
3 | * All rights reserved.
4 | *
5 | * Redistribution and use in source and binary forms, with or without
6 | * modification, are permitted provided that the following conditions are met:
7 | * * Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * * Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | * * Neither the name of the ASSDraw3 Team nor the
13 | * names of its contributors may be used to endorse or promote products
14 | * derived from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED BY AI-CHAN ``AS IS'' AND ANY
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 | * DISCLAIMED. IN NO EVENT SHALL AI-CHAN BE LIABLE FOR ANY
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 | */
27 |
28 | #pragma once
29 |
30 | // enum for IDs of menus
31 | enum {
32 | MENU_DUMMY = 200,
33 | MENU_CLEAR,
34 | MENU_PREVIEW,
35 | MENU_TRANSFORM,
36 | MENU_LIBRARY,
37 | MENU_HELP,
38 | MENU_RESETPERSPECTIVE,
39 | MENU_SETTINGS,
40 | MENU_UNDO,
41 | MENU_REDO,
42 | MENU_PASTE,
43 | MENU_BGIMG_LOAD,
44 | MENU_BGIMG_ALPHA,
45 | MENU_BGIMG_REMOVE,
46 | MENU_RECENTER,
47 | MENU_TBAR,
48 | MENU_REPOS_TOPLEFT,
49 | MENU_REPOS_TOPRIGHT,
50 | MENU_REPOS_CENTER,
51 | MENU_REPOS_BOTLEFT,
52 | MENU_REPOS_BOTRIGHT,
53 | MENU_BGIMG_RECENTER,
54 | MENU_REPOS_BGTOPLEFT,
55 | MENU_REPOS_BGTOPRIGHT,
56 | MENU_REPOS_BGCENTER,
57 | MENU_REPOS_BGBOTLEFT,
58 | MENU_REPOS_BGBOTRIGHT,
59 | MENU_DRC_LNTOBEZ,
60 | MENU_DRC_C1CONTBEZ,
61 | MENU_DRC_BEZTOLN,
62 | MENU_DRC_MOVE00,
63 | MENU_TB_ALL,
64 | MENU_TB_NONE,
65 | MENU_TB_DOCK,
66 | MENU_TB_UNDOCK,
67 | MENU_TB_DRAW,
68 | MENU_TB_MODE,
69 | MENU_TB_BGIMG
70 | };
71 |
72 | // enum for modes (i.e. create m, b, l etc or normal mode)
73 | // also use as tools IDs
74 | enum MODE
75 | {
76 | MODE_ARR = 100,
77 | MODE_M = 101,
78 | MODE_N = 102,
79 | MODE_L = 103,
80 | MODE_B = 104,
81 | MODE_S = 105,
82 | MODE_P = 106,
83 | MODE_C = 107,
84 | MODE_DEL = 108,
85 | MODE_SCALEROTATE = 109,
86 | MODE_NUT_BILINEAR = 110
87 | };
88 |
89 | // enum for IDs of other tools on the toolbar
90 | enum {
91 | TB_CLEAR = 111,
92 | TB_EDITSRC = 112,
93 | TB_PREVIEW = 113,
94 | TB_TRANSFORM = 114,
95 | TB_HELP = 115,
96 | TB_ZOOMSLIDER = 116,
97 | TB_BGALPHA_SLIDER = 117
98 | };
99 |
100 | enum DRAGMODETOOL
101 | {
102 | DRAG_DWG = 120,
103 | DRAG_BGIMG = 121,
104 | DRAG_BOTH = 122
105 | };
106 |
107 | struct DRAGMODE
108 | {
109 | bool drawing;
110 | bool bgimg;
111 | DRAGMODE() { drawing = true, bgimg = false; }
112 | DRAGMODE(bool d, bool b) { drawing = d, bgimg = b; }
113 | };
114 |
--------------------------------------------------------------------------------
/src/assdraw.rc:
--------------------------------------------------------------------------------
1 | // Microsoft Visual C++ generated resource script.
2 | //
3 | #include "resource.h"
4 |
5 | #define APSTUDIO_READONLY_SYMBOLS
6 | /////////////////////////////////////////////////////////////////////////////
7 | //
8 | // Generated from the TEXTINCLUDE 2 resource.
9 | //
10 | #include "afxres.h"
11 |
12 | /////////////////////////////////////////////////////////////////////////////
13 | #undef APSTUDIO_READONLY_SYMBOLS
14 |
15 | /////////////////////////////////////////////////////////////////////////////
16 | // English (U.S.) resources
17 |
18 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
19 | #ifdef _WIN32
20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
21 | #pragma code_page(1252)
22 | #endif //_WIN32
23 |
24 | /////////////////////////////////////////////////////////////////////////////
25 | //
26 | // Icon
27 | //
28 |
29 | // Icon with lowest ID value placed first to ensure application icon
30 | // remains consistent on all systems.
31 | APPICO ICON "tsukasa.ico"
32 |
33 | /////////////////////////////////////////////////////////////////////////////
34 | //
35 | // Bitmap
36 | //
37 |
38 | ASSDRAW3_ BITMAP "bitmaps/assdraw3.bmp"
39 | NEW_ BITMAP "bitmaps/new_.bmp"
40 | SRC_ BITMAP "bitmaps/src_.bmp"
41 | PREVIEW_ BITMAP "bitmaps/preview_.bmp"
42 | ARR_ BITMAP "bitmaps/arr_.bmp"
43 | M_ BITMAP "bitmaps/m_.bmp"
44 | N_ BITMAP "bitmaps/n_.bmp"
45 | L_ BITMAP "bitmaps/l_.bmp"
46 | B_ BITMAP "bitmaps/b_.bmp"
47 | S_ BITMAP "bitmaps/s_.bmp"
48 | P_ BITMAP "bitmaps/p_.bmp"
49 | C_ BITMAP "bitmaps/c_.bmp"
50 | DEL_ BITMAP "bitmaps/del_.bmp"
51 | NUT_ BITMAP "bitmaps/nut_.bmp"
52 | SC_ROT_ BITMAP "bitmaps/sc_rot_.bmp"
53 | ROT_ BITMAP "bitmaps/rot_.bmp"
54 | HELP_ BITMAP "bitmaps/help_.bmp"
55 | TRANSFORM BITMAP "bitmaps/transform.bmp"
56 | PAN_SHP BITMAP "bitmaps/pan_shp.bmp"
57 | PAN_BG BITMAP "bitmaps/pan_bg.bmp"
58 | //PAN_BOTH BITMAP "bitmaps/pan_both.bmp"
59 | ADD BITMAP "bitmaps/add_.bmp"
60 | CHECK BITMAP "bitmaps/check_.bmp"
61 | UNCHECK BITMAP "bitmaps/uncheck_.bmp"
62 | DELCROSS BITMAP "bitmaps/del_cross.bmp"
63 |
64 | #ifdef APSTUDIO_INVOKED
65 | /////////////////////////////////////////////////////////////////////////////
66 | //
67 | // TEXTINCLUDE
68 | //
69 |
70 | 1 TEXTINCLUDE
71 | BEGIN
72 | "resource.h\0"
73 | END
74 |
75 | 3 TEXTINCLUDE
76 | BEGIN
77 | "\r\n"
78 | END
79 |
80 | 2 TEXTINCLUDE
81 | BEGIN
82 | "#include ""afxres.h""\r\n"
83 | END
84 |
85 | #endif // APSTUDIO_INVOKED
86 |
87 | #endif // English (U.S.) resources
88 | /////////////////////////////////////////////////////////////////////////////
89 |
90 |
91 |
92 | #ifndef APSTUDIO_INVOKED
93 | /////////////////////////////////////////////////////////////////////////////
94 | //
95 | // Generated from the TEXTINCLUDE 3 resource.
96 | //
97 |
98 |
99 | /////////////////////////////////////////////////////////////////////////////
100 | #endif // not APSTUDIO_INVOKED
101 |
102 |
--------------------------------------------------------------------------------
/src/cmd.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2007, ai-chan
3 | * All rights reserved.
4 | *
5 | * Redistribution and use in source and binary forms, with or without
6 | * modification, are permitted provided that the following conditions are met:
7 | * * Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * * Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | * * Neither the name of the ASSDraw3 Team nor the
13 | * names of its contributors may be used to endorse or promote products
14 | * derived from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED BY AI-CHAN ``AS IS'' AND ANY
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 | * DISCLAIMED. IN NO EVENT SHALL AI-CHAN BE LIABLE FOR ANY
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 | */
27 |
28 | ///////////////////////////////////////////////////////////////////////////////
29 | // Name: cmd.hpp
30 | // Purpose: header file for ASSDraw drawing command classes
31 | // Author: ai-chan
32 | // Created: 08/26/06
33 | // Copyright: (c) ai-chan
34 | // Licence: 3-clause BSD
35 | ///////////////////////////////////////////////////////////////////////////////
36 |
37 | #pragma once
38 |
39 | #include "engine.hpp" // include the engine header for DrawCmd
40 | #include // ok, we use vector too
41 |
42 | // this header file declares the following classes
43 | class DrawCmd_M;
44 | class DrawCmd_L;
45 | class DrawCmd_B;
46 |
47 | // The M command
48 | class DrawCmd_M: public DrawCmd
49 | {
50 | public:
51 | // Constructor
52 | DrawCmd_M ( int x, int y, PointSystem *ps, DrawCmd *prev );
53 |
54 | // to ASS drawing command
55 | wxString ToString();
56 |
57 | };
58 |
59 | // The L command
60 | class DrawCmd_L: public DrawCmd
61 | {
62 | public:
63 | // Constructor
64 | DrawCmd_L ( int x, int y, PointSystem *ps, DrawCmd *prev );
65 |
66 | // to ASS drawing command
67 | wxString ToString();
68 |
69 | };
70 |
71 | // The B command
72 | class DrawCmd_B: public DrawCmd
73 | {
74 | public:
75 | // Constructor
76 | DrawCmd_B ( int x, int y, int x1, int y1, int x2, int y2, PointSystem *ps, DrawCmd *prev );
77 |
78 | // Special constructor where only m_point is defined
79 | // Need to call Init() to generate the controls
80 | DrawCmd_B ( int x, int y, PointSystem *ps, DrawCmd *prev );
81 |
82 | // Init this B command; generate controlpoints
83 | void Init ( unsigned n = 0 );
84 |
85 | // to ASS drawing command
86 | wxString ToString();
87 |
88 | //special
89 | bool C1Cont;
90 |
91 | };
92 |
93 | // The S command
94 | class DrawCmd_S: public DrawCmd
95 | {
96 | public:
97 | // Constructor
98 | DrawCmd_S ( int x, int y, PointSystem *ps, DrawCmd *prev );
99 |
100 | // Constructor (with points info)
101 | DrawCmd_S ( int x, int y, std::vector< int > vals, PointSystem *ps, DrawCmd *prev );
102 |
103 | // Init this S command; generate controlpoints
104 | void Init ( unsigned n = 0 );
105 |
106 | // to ASS drawing command
107 | wxString ToString();
108 |
109 | // special
110 | bool closed;
111 | };
112 |
113 |
--------------------------------------------------------------------------------
/src/xpm/sc_rot__xpm.xpm:
--------------------------------------------------------------------------------
1 | /* XPM */
2 | const char *sc_rot__xpm[] = {
3 | /* columns rows colors chars-per-pixel */
4 | "16 15 119 2",
5 | " c #212126264747",
6 | ". c #2B2B2B2B4848",
7 | "X c #363636364D4D",
8 | "o c #3B3B3B3B5C5C",
9 | "O c #141425256565",
10 | "+ c #0B0B27277D7D",
11 | "@ c #282828286262",
12 | "# c #373737376060",
13 | "$ c #363636366363",
14 | "% c #323232327878",
15 | "& c #3C3C4C4C5858",
16 | "* c #35354F4F6161",
17 | "= c #2F2F56567373",
18 | "- c #303055557070",
19 | "; c #404040405454",
20 | ": c #41414F4F5959",
21 | "> c #505050505050",
22 | ", c #505050505959",
23 | "< c #585858585858",
24 | "1 c #434343437F7F",
25 | "2 c #4B4B4B4B7979",
26 | "3 c #6F6F6F6F7676",
27 | "4 c #686868687D7D",
28 | "5 c gray44",
29 | "6 c gray47",
30 | "7 c #7C7C7C7C7C7C",
31 | "8 c #0B0B27279C9C",
32 | "9 c #202020208C8C",
33 | "0 c #16161C1CA0A0",
34 | "q c #00003737A0A0",
35 | "w c #00003737ACAC",
36 | "e c #0B0B2727BBBB",
37 | "r c #00003737B9B9",
38 | "t c #22222222A2A2",
39 | "y c #25252525A5A5",
40 | "u c #28282828A8A8",
41 | "i c #2F2F2F2FAFAF",
42 | "p c #35353535A2A2",
43 | "a c #37373737B7B7",
44 | "s c #3B3B3B3BBBBB",
45 | "d c #3E3E3E3EBEBE",
46 | "f c #181843438585",
47 | "g c #28285F5F8888",
48 | "h c #1F1F67679E9E",
49 | "j c #202062629595",
50 | "k c #242465659494",
51 | "l c #222267679A9A",
52 | "z c #222268689A9A",
53 | "x c #00004747B0B0",
54 | "c c #00005050B9B9",
55 | "v c #16167777BDBD",
56 | "b c #20206A6AA0A0",
57 | "n c #4B4B4B4B8686",
58 | "m c #474747478888",
59 | "M c #474747478D8D",
60 | "N c #474747478F8F",
61 | "B c #525252528D8D",
62 | "V c #474747479393",
63 | "C c #414141419595",
64 | "Z c #474747479494",
65 | "A c #474747479595",
66 | "S c #474747479A9A",
67 | "D c #474747479B9B",
68 | "F c #474747479C9C",
69 | "G c #5E5E5E5E9090",
70 | "H c #5E5E5E5E9292",
71 | "J c #696969698080",
72 | "K c #606060608A8A",
73 | "L c #6A6A6A6A9898",
74 | "P c #797979799696",
75 | "I c #757575759D9D",
76 | "U c #767676769E9E",
77 | "Y c #47474747A0A0",
78 | "T c #47474747A1A1",
79 | "R c #47474747A3A3",
80 | "E c #44444444A5A5",
81 | "W c #47474747A6A6",
82 | "Q c #47474747A7A7",
83 | "! c #47474747ACAC",
84 | "~ c #47474747AEAE",
85 | "^ c #47474747AFAF",
86 | "/ c #47474747B4B4",
87 | "( c #47474747B9B9",
88 | ") c #47474747BABA",
89 | "_ c #00003737C5C5",
90 | "` c #00003737CCCC",
91 | "' c #00003737D2D2",
92 | "] c #00003737D8D8",
93 | "[ c #00003737DFDF",
94 | "{ c #00005A5AC3C3",
95 | "} c #00006C6CD6D6",
96 | "| c #00007F7FE9E9",
97 | " . c #47474747C0C0",
98 | ".. c #47474747C1C1",
99 | "X. c #44444444C4C4",
100 | "o. c #46464646C6C6",
101 | "O. c #47474747C6C6",
102 | "+. c #47474747C7C7",
103 | "@. c #00009191FCFC",
104 | "#. c #00009494FFFF",
105 | "$. c #909090909090",
106 | "%. c #80808080A2A2",
107 | "&. c #82828282A3A3",
108 | "*. c #8C8C8C8CA8A8",
109 | "=. c #8F8F8F8FA9A9",
110 | "-. c #98989898ADAD",
111 | ";. c #99999999AEAE",
112 | ":. c #A4A4A4A4A4A4",
113 | ">. c gray66",
114 | ",. c #ACACACACACAC",
115 | "<. c #A3A3A3A3B2B2",
116 | "1. c #A4A4A4A4B3B3",
117 | "2. c #A7A7A7A7B4B4",
118 | "3. c #B0B0B0B0B8B8",
119 | "4. c #B1B1B1B1B9B9",
120 | "5. c #BCBCBCBCBDBD",
121 | "6. c #BCBCBCBCBEBE",
122 | "7. c gray75",
123 | "8. c None",
124 | /* pixels */
125 | ": * = g j b b : 7 >.8.8.8.8.8.8.",
126 | "k v z - O c f 4 , > 6 >.8.8.8.",
127 | "b #.#.@.q ] ` 8 D N n 2 o ; 3 ,.",
128 | "b #.#.| w [ [ e +.+. ./ W C % . ",
129 | "b #.#.} r [ [ e +.+.+.+.+.+.) G ",
130 | "b #.#.{ _ [ [ e +.+.+.+.+.+.~ I ",
131 | "b #.#.x ' [ [ e +.+.+.+.+.+.T *.",
132 | "& l h + e e e 0 X.+.+.+.+.+.Z 1.",
133 | "$.5 <.A +.+.+.d t o.+.+.+.O.m 6.",
134 | "8.< P R +.+.+.+.a u +.+.+.( H 8.",
135 | "8.:.# ^ +.+.+.+.+.i i +.+.! U 8.",
136 | "8.8.$ p +.+.+.+.+.+.u a +.Y =.8.",
137 | "8.5.J @ M S Q / ..+.o.y s V 2.8.",
138 | "8.8.8.8.4.;.&.L B N F E 9 1 7.8.",
139 | "8.8.8.8.8.8.8.8.8.3.-.%.K X 8.8."
140 | };
141 |
--------------------------------------------------------------------------------
/src/dlgctrl.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2007, ai-chan
3 | * All rights reserved.
4 | *
5 | * Redistribution and use in source and binary forms, with or without
6 | * modification, are permitted provided that the following conditions are met:
7 | * * Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * * Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | * * Neither the name of the ASSDraw3 Team nor the
13 | * names of its contributors may be used to endorse or promote products
14 | * derived from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED BY AI-CHAN ``AS IS'' AND ANY
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 | * DISCLAIMED. IN NO EVENT SHALL AI-CHAN BE LIABLE FOR ANY
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 | */
27 |
28 | #pragma once
29 |
30 | #include "_common.hpp"
31 | #include
32 | #include
33 |
34 |
35 | class ASSDrawFrame;
36 |
37 | class ASSDrawSrcTxtCtrl : public wxTextCtrl
38 | {
39 | public:
40 | ASSDrawSrcTxtCtrl(wxWindow *parent, ASSDrawFrame *frame);
41 | virtual void CustomOnChar(wxKeyEvent &event);
42 | virtual void CustomOnText(wxCommandEvent &event);
43 |
44 | protected:
45 | ASSDrawFrame *m_frame;
46 | DECLARE_EVENT_TABLE()
47 | };
48 |
49 | struct EightDouble
50 | {
51 | double f1, f2, f3, f4, f5, f6, f7, f8;
52 | };
53 |
54 | class ASSDrawTransformDlg : public wxDialog
55 | {
56 |
57 | public:
58 | ASSDrawTransformDlg(ASSDrawFrame* parent);
59 | void OnTemplatesCombo(wxCommandEvent &event);
60 | void EndModal(int retCode);
61 |
62 | ASSDrawFrame* m_frame;
63 | wxComboBox* combo_templates;
64 | wxTextCtrl* txtctrl_m11;
65 | wxTextCtrl* txtctrl_m12;
66 | wxTextCtrl* txtctrl_m21;
67 | wxTextCtrl* txtctrl_m22;
68 | wxTextCtrl* txtctrl_mx;
69 | wxTextCtrl* txtctrl_my;
70 | wxTextCtrl* txtctrl_nx;
71 | wxTextCtrl* txtctrl_ny;
72 | EightDouble xformvals;
73 |
74 | static wxString combo_templatesStrings[];
75 | static int combo_templatesCount;
76 | static EightDouble combo_templatesValues[];
77 |
78 | DECLARE_EVENT_TABLE()
79 |
80 | };
81 |
82 | class ASSDrawAboutDlg : public wxDialog
83 | {
84 | public:
85 | ASSDrawAboutDlg(ASSDrawFrame *parent, unsigned timeout = 0);
86 | virtual ~ASSDrawAboutDlg();
87 | virtual void OnURL(wxHtmlLinkEvent &event);
88 | virtual int ShowModal();
89 | virtual void OnTimeout(wxTimerEvent& event);
90 | virtual void OnMouseEnterWindow(wxMouseEvent& event);
91 |
92 | protected:
93 | wxTimer timer;
94 | wxHtmlWindow *htmlwin;
95 | const unsigned time_out;
96 | };
97 |
98 | class BigStaticBitmapCtrl : public wxPanel
99 | {
100 | public:
101 | BigStaticBitmapCtrl(wxWindow *parent, wxBitmap bmap, wxColour bgcol, wxWindow *todrag = NULL);
102 | virtual ~BigStaticBitmapCtrl();
103 | virtual void OnPaint(wxPaintEvent& event);
104 | virtual void OnMouseLeftDown(wxMouseEvent &event);
105 | virtual void OnMouseLeftUp(wxMouseEvent &event);
106 | virtual void OnMouseMove(wxMouseEvent &event);
107 |
108 | protected:
109 | wxBitmap bitmap;
110 | wxBrush bgbrush;
111 | wxWindow *window_to_drag;
112 | wxPoint dragpoint, wndpos;
113 |
114 | DECLARE_EVENT_TABLE()
115 | };
116 |
--------------------------------------------------------------------------------
/src/settings.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2007, ai-chan
3 | * All rights reserved.
4 | *
5 | * Redistribution and use in source and binary forms, with or without
6 | * modification, are permitted provided that the following conditions are met:
7 | * * Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * * Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | * * Neither the name of the ASSDraw3 Team nor the
13 | * names of its contributors may be used to endorse or promote products
14 | * derived from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED BY AI-CHAN ``AS IS'' AND ANY
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 | * DISCLAIMED. IN NO EVENT SHALL AI-CHAN BE LIABLE FOR ANY
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 | */
27 |
28 | #pragma once
29 |
30 | #include "_common.hpp"
31 | #include
32 | #include
33 |
34 | class ASSDrawFrame;
35 |
36 | DECLARE_EVENT_TYPE(wxEVT_SETTINGS_CHANGED, -1)
37 |
38 | typedef wxPGProperty* wxPGId;
39 |
40 | class ASSDrawSettingsDialog : public wxPanel
41 | {
42 | public:
43 |
44 | ASSDrawFrame* m_frame;
45 |
46 | ASSDrawSettingsDialog( wxWindow *parent, ASSDrawFrame *frame, int id = wxID_ANY );
47 | virtual ~ASSDrawSettingsDialog();
48 |
49 | virtual void Init();
50 | virtual void OnSettingsApplyButtonClicked(wxCommandEvent &event);
51 | virtual void OnSettingsRevertButtonClicked(wxCommandEvent &event);
52 | virtual void RefreshSettingsDisplay();
53 |
54 | wxPGId colors_canvas_bg_pgid;
55 | wxPGId colors_canvas_shape_normal_pgid;
56 | wxPGId colors_canvas_shape_preview_pgid;
57 | wxPGId colors_canvas_shape_outline_pgid;
58 | wxPGId colors_canvas_shape_guideline_pgid;
59 | wxPGId colors_canvas_shape_mainpoint_pgid;
60 | wxPGId colors_canvas_shape_controlpoint_pgid;
61 | wxPGId colors_canvas_shape_selectpoint_pgid;
62 | wxPGId colors_library_shape_pgid;
63 | wxPGId colors_library_libarea_pgid;
64 | wxPGId colors_origin_pgid;
65 | wxPGId colors_ruler_h_pgid;
66 | wxPGId colors_ruler_v_pgid;
67 | wxPGId alphas_canvas_shape_normal_pgid;
68 | wxPGId alphas_canvas_shape_preview_pgid;
69 | wxPGId alphas_canvas_shape_outline_pgid;
70 | wxPGId alphas_canvas_shape_guideline_pgid;
71 | wxPGId alphas_canvas_shape_mainpoint_pgid;
72 | wxPGId alphas_canvas_shape_controlpoint_pgid;
73 | wxPGId alphas_canvas_shape_selectpoint_pgid;
74 | wxPGId sizes_origincross_pgid;
75 | wxPGId behaviors_capitalizecmds_pgid;
76 | wxPGId behaviors_autoaskimgopac_pgid;
77 | wxPGId behaviors_parse_spc_pgid;
78 | wxPGId behaviors_nosplashscreen_pgid;
79 | wxPGId behaviors_confirmquit_pgid;
80 |
81 | wxPropertyGrid *propgrid;
82 | //DECLARE_EVENT_TABLE()
83 |
84 | };
85 |
86 | class wxLongPropertyValidator : public wxValidator
87 | {
88 | public:
89 |
90 | wxLongPropertyValidator( const int min, const int max )
91 | : wxValidator()
92 | {
93 | m_min = min, m_max = max;
94 | }
95 |
96 | virtual wxObject* Clone() const
97 | {
98 | return new wxLongPropertyValidator( m_min, m_max );
99 | }
100 |
101 | virtual bool Validate(wxWindow* WXUNUSED(parent))
102 | {
103 | wxTextCtrl* tc = wxDynamicCast(GetWindow(), wxTextCtrl);
104 | wxCHECK_MSG(tc, true, wxT("validator window must be wxTextCtrl"));
105 |
106 | wxString val = tc->GetValue();
107 |
108 | long valint = 0;
109 | val.ToLong(&valint);
110 |
111 | if (valint < m_min) valint = m_min;
112 | if (valint > m_max) valint = m_max;
113 |
114 | tc->SetValue(wxString::Format(_T("%d"), valint));
115 |
116 | return true;
117 | }
118 |
119 | private:
120 | int m_min, m_max;
121 | };
122 |
--------------------------------------------------------------------------------
/src/wxAGG/AGGWindow.cpp:
--------------------------------------------------------------------------------
1 | #include "AGGWindow.h"
2 |
3 | #include "agg_rendering_buffer.h"
4 | #include "agg_pixfmt_rgb.h"
5 |
6 | #include
7 |
8 | namespace GUI {
9 |
10 | BEGIN_EVENT_TABLE(AGGWindow, wxWindow)
11 | EVT_PAINT(AGGWindow::onPaint)
12 | EVT_SIZE(AGGWindow::onSize)
13 | EVT_ERASE_BACKGROUND(AGGWindow::onEraseBackground)
14 | END_EVENT_TABLE()
15 |
16 | AGGWindow::AGGWindow(wxWindow* parent, wxWindowID id,
17 | const wxPoint& pos, const wxSize& size, long style):
18 | wxWindow(parent, id, pos, size, style, wxT("AGGWindow")),
19 | bitmap(NULL) {
20 | }
21 |
22 | void AGGWindow::init(const int width, const int height) {
23 | memDC.SelectObject(wxNullBitmap);
24 | delete bitmap;
25 |
26 | int ncheight = height, ncwidth = width;
27 | if (ncwidth < 1) ncwidth = 1;
28 | if (ncheight < 1) ncheight = 1;
29 |
30 | bitmap = new wxBitmap(ncwidth, ncheight, PixelFormat::wxWidgetsType::BitsPerPixel);
31 |
32 | // Draw the bitmap
33 | attachAndDraw();
34 |
35 | memDC.SelectObject(*bitmap);
36 |
37 | // Request a full redraw of the window
38 | Refresh(false);
39 | }
40 |
41 | AGGWindow::~AGGWindow() {
42 | memDC.SelectObject(wxNullBitmap);
43 | delete bitmap;
44 | }
45 |
46 | void AGGWindow::attachAndDraw() {
47 | // Get raw access to the wxWidgets bitmap -- this locks the pixels and
48 | // unlocks on destruction.
49 | PixelData data(*bitmap);
50 | assert(data);
51 |
52 | #if 1
53 | // This cast looks like it is ignoring byte-ordering, but the
54 | // pixel format already explicitly handles that.
55 | assert(data.GetPixels().IsOk());
56 | wxAlphaPixelFormat::ChannelType* pd = (wxAlphaPixelFormat::ChannelType*) &data.GetPixels().Data();
57 |
58 | // wxWidgets always returns a pointer to the first row of pixels, whether
59 | // that is stored at the beginning of the buffer (stride > 0) or at the
60 | // end of the buffer (stride < 0). AGG always wants a pointer to the
61 | // beginning of the buffer, no matter what the stride. (AGG does handle
62 | // negative strides correctly.)
63 | // Upshot: if the stride is negative, rewind the pointer from the end of
64 | // the buffer to the beginning.
65 | const int stride = data.GetRowStride();
66 | if (stride < 0)
67 | pd += (data.GetHeight() - 1) * stride;
68 |
69 | rBuf.attach(pd, data.GetWidth(), data.GetHeight(), stride);
70 |
71 | // Call the user code to actually draw.
72 | draw();
73 | #else
74 | PixelData::Iterator p(data);
75 |
76 | // we draw a (10, 10)-(20, 20) rect manually using the given r, g, b
77 | p.Offset(data, 10, 10);
78 |
79 | for ( int y = 0; y < 10; ++y )
80 | {
81 | PixelData::Iterator rowStart = p;
82 |
83 | for ( int x = 0; x < 10; ++x, ++p )
84 | {
85 | p.Red() = 255;
86 | p.Green() = 0;
87 | p.Blue() = 255;
88 | }
89 |
90 | p = rowStart;
91 | p.OffsetY(data, 1);
92 | }
93 | #endif
94 | }
95 |
96 | void AGGWindow::onSize(wxSizeEvent& event) {
97 | const wxSize size = GetClientSize();
98 | if (bitmap && size.GetWidth() == bitmap->GetWidth() && size.GetHeight() == bitmap->GetHeight())
99 | return;
100 |
101 | init(size.GetWidth(), size.GetHeight());
102 | }
103 |
104 | void AGGWindow::onPaint(wxPaintEvent& event) {
105 | wxPaintDC dc(this);
106 |
107 | wxCoord width, height;
108 | dc.GetSize(&width, &height);
109 | if (!bitmap || bitmap->GetWidth() != width || bitmap->GetHeight() != height)
110 | init(width, height);
111 |
112 | // Iterate over regions needing repainting
113 | wxRegionIterator regions(GetUpdateRegion());
114 | wxRect rect;
115 | while (regions) {
116 | rect = regions.GetRect();
117 | dc.Blit(rect.x, rect.y, rect.width, rect.height, &memDC, rect.x, rect.y);
118 | ++regions;
119 | }
120 | }
121 |
122 | void AGGWindow::onEraseBackground(wxEraseEvent& WXUNUSED(event)) {
123 | // Do nothing to "avoid flashing in MSW" Grr.
124 | }
125 |
126 | }
127 |
128 |
--------------------------------------------------------------------------------
/src/wxAGG/PixelFormatConvertor.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2007, ai-chan
3 | * All rights reserved.
4 | *
5 | * Redistribution and use in source and binary forms, with or without
6 | * modification, are permitted provided that the following conditions are met:
7 | * * Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * * Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | * * Neither the name of the ASSDraw3 Team nor the
13 | * names of its contributors may be used to endorse or promote products
14 | * derived from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED BY AI-CHAN ``AS IS'' AND ANY
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 | * DISCLAIMED. IN NO EVENT SHALL AI-CHAN BE LIABLE FOR ANY
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 | */
27 |
28 | #ifndef WX_AGG_PIXEL_FORMAT_CONVERTOR_H
29 | #define WX_AGG_PIXEL_FORMAT_CONVERTOR_H
30 |
31 | #include "agg_pixfmt_rgb.h"
32 | #include "agg_pixfmt_rgba.h"
33 |
34 | namespace {
35 |
36 | /// Given a particular combination of channel type, bits per pixel and
37 | /// channel indices, return the AGG format that matches.
38 | /// The actual template specializations that follow give the actual types,
39 | /// and using a combination of parameters that are not listed will give
40 | /// a compile-time error.
41 | template
42 | struct wxWidgetsToAGGHelper {
43 | //empty
44 | };
45 |
46 | /// 24-bit RGB
47 | template <> struct wxWidgetsToAGGHelper {
48 | typedef agg::pixfmt_rgb24 format;
49 | };
50 |
51 | /// 24-bit BGR
52 | template <> struct wxWidgetsToAGGHelper {
53 | typedef agg::pixfmt_bgr24 format;
54 | };
55 |
56 | /// 32-bit RGB, alpha unused but stored as ARGB.
57 | template <> struct wxWidgetsToAGGHelper {
58 | typedef agg::pixfmt_argb32 format;
59 | };
60 |
61 | /// 32-bit RGB, alpha unused but stored as RGBA.
62 | template <> struct wxWidgetsToAGGHelper {
63 | typedef agg::pixfmt_rgba32 format;
64 | };
65 |
66 | /// 32-bit BGR, alpha unused but stored as ABGR.
67 | template <> struct wxWidgetsToAGGHelper {
68 | typedef agg::pixfmt_abgr32 format;
69 | };
70 |
71 | /// 32-bit BGR, alpha unused but stored as BGRA.
72 | template <> struct wxWidgetsToAGGHelper {
73 | typedef agg::pixfmt_bgra32 format;
74 | };
75 |
76 | /// 32-bit RGBA
77 | template <> struct wxWidgetsToAGGHelper {
78 | typedef agg::pixfmt_rgba32 format;
79 | };
80 |
81 | /// 32-bit BGRA
82 | template <> struct wxWidgetsToAGGHelper {
83 | typedef agg::pixfmt_bgra32 format;
84 | };
85 |
86 | /// 32-bit ARGB
87 | template <> struct wxWidgetsToAGGHelper {
88 | typedef agg::pixfmt_argb32 format;
89 | };
90 |
91 | /// 32-bit ABGR
92 | template <> struct wxWidgetsToAGGHelper {
93 | typedef agg::pixfmt_abgr32 format;
94 | };
95 | }
96 |
97 | namespace GUI {
98 | /// Convert between a wxWidgets pixel format class and an AGG pixel format class.
99 | /// Usage examples:
100 | /// PixelFormatConvertor::AGGType or
101 | /// PixelFormatConvertor::AGGType.
102 | template
103 | class PixelFormatConvertor {
104 | public:
105 | typedef wxWidgetsPixelFormat wxWidgetsType;
106 |
107 | // Break out the wxWidgets parameters and feed to the helper class.
108 | typedef typename wxWidgetsToAGGHelper::format AGGType;
114 | };
115 | }
116 |
117 | #endif
118 |
--------------------------------------------------------------------------------
/src/include_once.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2007, ai-chan
3 | * All rights reserved.
4 | *
5 | * Redistribution and use in source and binary forms, with or without
6 | * modification, are permitted provided that the following conditions are met:
7 | * * Redistributions of source code must retain the above copyright
8 | * notice, this list of conditions and the following disclaimer.
9 | * * Redistributions in binary form must reproduce the above copyright
10 | * notice, this list of conditions and the following disclaimer in the
11 | * documentation and/or other materials provided with the distribution.
12 | * * Neither the name of the ASSDraw3 Team nor the
13 | * names of its contributors may be used to endorse or promote products
14 | * derived from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED BY AI-CHAN ``AS IS'' AND ANY
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 | * DISCLAIMED. IN NO EVENT SHALL AI-CHAN BE LIABLE FOR ANY
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 | */
27 | ///////////////////////////////////////////////////////////////////////////////
28 | // Name: include_once.hpp
29 | // Purpose: A header file that is included exactly once for the whole code
30 | // (supposed to be included by assdraw.cpp only)
31 | // Put must-define-exactly-once codes here
32 | // Author: ai-chan
33 | // Created: 08/26/06
34 | // Copyright: (c) ai-chan
35 | // Licence: 3-clause BSD
36 | ///////////////////////////////////////////////////////////////////////////////
37 |
38 | // tooltips
39 | const wxString TIPS_CLEAR = wxT("Clear the canvas and create a new drawing");
40 | const wxString TIPS_EDITSRC = wxT("Edit the source");
41 | const wxString TIPS_PREVIEW = wxT("Draw the shapes without enlarged points and control points");
42 | const wxString TIPS_TRANSFORM = wxT("Transform the drawing using matrix transformation");
43 | const wxString TIPS_LIBRARY = wxT("Shapes library");
44 | const wxString TIPS_HELP = wxT("Help! Help!");
45 | const wxString TIPS_PASTE = wxT("Depending on what's in the clipboard, import as drawing commands or background");
46 | const wxString TIPS_UNDO = wxT("Undo last action");
47 | const wxString TIPS_REDO = wxT("Redo last undo");
48 | const wxString TIPS_ARR = wxT("Drag mode");
49 | const wxString TIPS_M = wxT("Draw M mode (Close current shape and move the virtual pen to a new point)");
50 | const wxString TIPS_N = wxT("Draw N mode (Same as M but doesn't close the shape)");
51 | const wxString TIPS_L = wxT("Draw L mode (Straight line)");
52 | const wxString TIPS_B = wxT("Draw B mode (Cubic Bezier curve)");
53 | const wxString TIPS_S = wxT("Draw S mode (Spline)");
54 | const wxString TIPS_P = wxT("Draw P mode (Extends a spline with another point)");
55 | const wxString TIPS_C = wxT("Draw C mode (Close the last spline)");
56 | const wxString TIPS_DEL = wxT("Delete mode");
57 | const wxString TIPS_NUTB = wxT("Bilinear transformation mode: Drag the vertices to distort the shape; Dragging an edge moves two adjacent vertices together");
58 | const wxString TIPS_SCALEROTATE = wxT("Scale/Rotate mode: Drag a vertex or an edge to rescale the shape; Right-drag to rotate");
59 | const wxString TIPS_DWG = wxT("Right-dragging pans drawing, mousewheel zooms in/out drawing");
60 | const wxString TIPS_BGIMG = wxT("Right-dragging pans background, mousewheel zooms in/out background");
61 | const wxString TIPS_BOTH = wxT("Right-dragging pans drawing & background, mousewheel zooms in/out drawing & background");
62 |
63 | const wxString TBNAME_DRAW = wxT("Canvas");
64 | const wxString TBNAME_MODE = wxT("Drawing mode");
65 | const wxString TBNAME_BGIMG = wxT("Background");
66 | const wxString TBNAME_ZOOM = wxT("Zoom");
67 |
68 | wxString ASSDrawTransformDlg::combo_templatesStrings[] = {
69 | _("