diff options
| -rw-r--r-- | GNUmakefile | 21 | ||||
| -rw-r--r-- | dmagick/Image.d | 36 | ||||
| -rw-r--r-- | dmagick/Utils.d | 2 |
3 files changed, 41 insertions, 18 deletions
diff --git a/GNUmakefile b/GNUmakefile index 6f6101c..abace8e 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -48,16 +48,16 @@ RANLIB=ranlib ####################################################################### LIBNAME_DMAGICK = libdmagick.a -SOURCES_DMAGICK = $(shell find \ - dmagick \ - -name '*.d' ) -OBJECTS_DMAGICK = $(shell echo $(SOURCES_DMAGICK) | sed -e 's/\.d/\.o/g') +SOURCES_DMAGICK = $(sort $(wildcard dmagick/*.d)) \ + $(sort $(wildcard dmagick/c/*.d)) + +OBJECTS_DMAGICK = $(patsubst %.d,%.o,$(SOURCES_DMAGICK)) +DOCS_DMAGICK = $(patsubst dmagick/%.d,docs/%.html,$(SOURCES_DMAGICK)) ####################################################################### lib: $(LIBNAME_DMAGICK) -$(LIBNAME_DMAGICK): IMPORTS=-Idmagick $(LIBNAME_DMAGICK): $(OBJECTS_DMAGICK) $(AR) rcs $@ $^ $(RANLIB) $@ @@ -69,6 +69,15 @@ $(LIBNAME_DMAGICK): $(OBJECTS_DMAGICK) ####################################################################### +docs: $(DOCS_DMAGICK) + +####################################################################### + +docs/%.html : dmagick/%.d + $(DC) $(DCFLAGS) $(IMPORTS) -o- $< -Df$@ + +####################################################################### + install: lib install -d $(DESTDIR)$(prefix)/include/d (echo $(SOURCES_DMAGICK) | xargs tar c) | (cd $(DESTDIR)$(prefix)/include/d; tar xv) @@ -80,4 +89,4 @@ uninstall: rm -f $(DESTDIR)$(prefix)/lib/$(LIBNAME_DMAGICK) clean: - -rm -f $(LIBNAME_DMAGICK) $(OBJECTS_DMAGICK) + -rm -rf $(LIBNAME_DMAGICK) $(OBJECTS_DMAGICK) docs diff --git a/dmagick/Image.d b/dmagick/Image.d index 499e9d7..5cb44a3 100644 --- a/dmagick/Image.d +++ b/dmagick/Image.d @@ -1295,13 +1295,17 @@ class Image * interpreted as the same color for the purposes of the floodfill. * * Params: - * xOffset = Starting x location for the filling. - * xOffset = Starting y location for the filling. + * xOffset = Starting x location for the operation. + * xOffset = Starting y location for the operation. * fillToBorder = If true fill untill the borderColor, else only * the target color if affected. * channel = The affected channels. */ - void floodFill(ssize_t xOffset, ssize_t yOffset, bool fillToBorder = false, ChannelType channel = ChannelType.DefaultChannels) + void floodFill( + ssize_t xOffset, + ssize_t yOffset, + bool fillToBorder = false, + ChannelType channel = ChannelType.DefaultChannels) { MagickPixelPacket target; @@ -1332,13 +1336,18 @@ class Image * Fill the image like floodFill but use the specified colors. * * Params: - * xOffset = Starting x location for the filling. - * xOffset = Starting y location for the filling. + * xOffset = Starting x location for the operation. + * xOffset = Starting y location for the operation. * fillColor = Fill color to use. * borderColor = borderColor to use. * channel = The affected channels. */ - void floodFillColor(ssize_t xOffset, ssize_t yOffset, Color fillColor, Color borderColor = null, ChannelType channel = ChannelType.DefaultChannels) + void floodFillColor( + ssize_t xOffset, + ssize_t yOffset, + Color fillColor, + Color borderColor = null, + ChannelType channel = ChannelType.DefaultChannels) { Color oldFillColor = options.fillColor; options.fillColor = fillColor; @@ -1352,13 +1361,18 @@ class Image * pattern an borderColor. * * Params: - * xOffset = Starting x location for the filling. - * xOffset = Starting y location for the filling. + * xOffset = Starting x location for the operation. + * xOffset = Starting y location for the operation. * fillPattern = Fill pattern to use. * borderColor = borderColor to use. * channel = The affected channels. */ - void floodFillPattern(ssize_t xOffset, ssize_t yOffset, Image fillPattern, Color borderColor = null, ChannelType channel = ChannelType.DefaultChannels) + void floodFillPattern( + ssize_t xOffset, + ssize_t yOffset, + Image fillPattern, + Color borderColor = null, + ChannelType channel = ChannelType.DefaultChannels) { // Cast away const, so we can temporarily hold // The image and asign it back to the fillPattern. @@ -2737,12 +2751,12 @@ class Image */ version (Windows) { - static this() + shared static this() { MagickCoreGenesis(toStringz(Runtime.args[0]) , false); } - static ~this() + shared static ~this() { MagickCoreTerminus(); } diff --git a/dmagick/Utils.d b/dmagick/Utils.d index 2f71f64..f6664e3 100644 --- a/dmagick/Utils.d +++ b/dmagick/Utils.d @@ -89,7 +89,7 @@ real degreesToRadians(real deg) /** - * A template struct ot make pointers to ImageMagick structs + * A template struct to make pointers to ImageMagick structs * reference counted. Excepts a predicate pred which destroys * the struct pointer when refCount is 0. */ |
