Commit db7fe5d9 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander Trofimov

правки для билда под виндой

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@62572 954022d7-b5bf-4e40-9824-e11837661b57
parent ab923555
#-------------------------------------------------
#
# Project created by QtCreator 2014-03-15T18:33:57
#
#-------------------------------------------------
QT -= core gui
TARGET = graphics
TEMPLATE = lib
CONFIG += staticlib
DEFINES += \
_QT \
FT2_BUILD_LIBRARY \
EXCLUDE_JPG_SUPPORT \
MNG_SUPPORT_DISPLAY \
MNG_SUPPORT_READ \
MNG_SUPPORT_WRITE \
MNG_ACCESS_CHUNKS \
MNG_STORE_CHUNKS\
MNG_ERROR_TELLTALE
linux-g++ | linux-g++-64 | linux-g++-32 {
DEFINES += \
HAVE_UNISTD_H \
LINUX \
_LINUX \
_LINUX_QT
CONFIG += c++11
message(linux)
}
mac {
DEFINES += \
HAVE_UNISTD_H \
_LINUX \
_LINUX_QT \
_MAC \
QT_MAC
message(mac)
}
win32 {
DEFINES += \
JAS_WIN_MSVC_BUILD \
WIN32
DEFINES -= UNICODE
message(windows)
}
INCLUDEPATH += \
../../../agg-2.4/include \
../../../freetype-2.5.2/include \
../../../cximage/jasper/include \
../../../cximage/jpeg \
../../../cximage/png \
../../../cximage/zlib
SOURCES += \
../../../graphics/ArrowHead.cpp \
../../../graphics/Brush.cpp \
../../../graphics/Clip.cpp \
../../../graphics/Graphics.cpp \
../../../graphics/GraphicsPath.cpp \
../../../graphics/GraphicsRenderer.cpp \
../../../graphics/Image.cpp \
../../../graphics/Matrix.cpp \
../../../graphics/TemporaryCS.cpp \
\
../../../agg-2.4/src/agg_arc.cpp \
../../../agg-2.4/src/agg_bezier_arc.cpp \
../../../agg-2.4/src/agg_arrowhead.cpp \
../../../agg-2.4/src/ctrl/agg_cbox_ctrl.cpp \
../../../agg-2.4/src/agg_curves.cpp \
../../../agg-2.4/src/agg_gsv_text.cpp \
../../../agg-2.4/src/agg_image_filters.cpp \
../../../agg-2.4/src/agg_line_aa_basics.cpp \
../../../agg-2.4/src/agg_line_profile_aa.cpp \
../../../agg-2.4/src/agg_rounded_rect.cpp \
../../../agg-2.4/src/agg_sqrt_tables.cpp \
../../../agg-2.4/src/agg_trans_affine.cpp \
../../../agg-2.4/src/agg_vcgen_bspline.cpp \
../../../agg-2.4/src/agg_vcgen_contour.cpp \
../../../agg-2.4/src/agg_vcgen_dash.cpp \
../../../agg-2.4/src/agg_vcgen_markers_term.cpp \
../../../agg-2.4/src/agg_vcgen_smooth_poly1.cpp \
../../../agg-2.4/src/agg_vcgen_stroke.cpp \
\
../../../freetype-2.5.2/src/base/ftbbox.c \
../../../freetype-2.5.2/src/base/ftgxval.c \
../../../freetype-2.5.2/src/base/ftlcdfil.c \
../../../freetype-2.5.2/src/base/ftmm.c \
../../../freetype-2.5.2/src/base/ftotval.c \
../../../freetype-2.5.2/src/base/ftpatent.c \
../../../freetype-2.5.2/src/base/ftpfr.c \
../../../freetype-2.5.2/src/base/ftsynth.c \
../../../freetype-2.5.2/src/base/fttype1.c \
../../../freetype-2.5.2/src/base/ftwinfnt.c \
../../../freetype-2.5.2/src/base/ftxf86.c \
../../../freetype-2.5.2/src/pcf/pcf.c \
../../../freetype-2.5.2/src/pfr/pfr.c \
../../../freetype-2.5.2/src/psaux/psaux.c \
../../../freetype-2.5.2/src/pshinter/pshinter.c \
../../../freetype-2.5.2/src/psnames/psmodule.c \
../../../freetype-2.5.2/src/raster/raster.c \
../../../freetype-2.5.2/src/sfnt/sfnt.c \
../../../freetype-2.5.2/src/truetype/truetype.c \
../../../freetype-2.5.2/src/type1/type1.c \
../../../freetype-2.5.2/src/cid/type1cid.c \
../../../freetype-2.5.2/src/type42/type42.c \
../../../freetype-2.5.2/src/winfonts/winfnt.c \
\
../../../freetype-2.5.2/src/autofit/autofit.c \
../../../freetype-2.5.2/src/bdf/bdf.c \
../../../freetype-2.5.2/src/cff/cff.c \
../../../freetype-2.5.2/src/base/ftbase.c \
../../../freetype-2.5.2/src/base/ftbitmap.c \
../../../freetype-2.5.2/src/cache/ftcache.c \
../../../freetype-2.5.2/src/base/ftfstype.c \
../../../freetype-2.5.2/src/base/ftgasp.c \
../../../freetype-2.5.2/src/base/ftglyph.c \
../../../freetype-2.5.2/src/gzip/ftgzip.c \
../../../freetype-2.5.2/src/base/ftinit.c \
../../../freetype-2.5.2/src/lzw/ftlzw.c \
../../../freetype-2.5.2/src/base/ftstroke.c \
../../../freetype-2.5.2/src/base/ftsystem.c \
../../../freetype-2.5.2/src/smooth/smooth.c \
\
../../../fontengine/ApplicationFonts.cpp \
../../../fontengine/FontFile.cpp \
../../../fontengine/FontManager.cpp \
../../../fontengine/FontPath.cpp \
../../../fontengine/GlyphString.cpp \
\
../../../cximage/jasper/base/jas_cm.c \
../../../cximage/jasper/base/jas_debug.c \
../../../cximage/jasper/base/jas_getopt.c \
../../../cximage/jasper/base/jas_icc.c \
../../../cximage/jasper/base/jas_iccdata.c \
../../../cximage/jasper/base/jas_image.c \
../../../cximage/jasper/base/jas_init.c \
../../../cximage/jasper/base/jas_malloc.c \
../../../cximage/jasper/base/jas_stream.c \
../../../cximage/jasper/base/jas_seq.c \
../../../cximage/jasper/base/jas_string.c \
../../../cximage/jasper/base/jas_tvp.c \
../../../cximage/jasper/base/jas_version.c \
../../../cximage/jasper/bmp/bmp_cod.c \
../../../cximage/jasper/bmp/bmp_dec.c \
../../../cximage/jasper/bmp/bmp_enc.c \
../../../cximage/jasper/jp2/jp2_cod.c \
../../../cximage/jasper/jp2/jp2_dec.c \
../../../cximage/jasper/jp2/jp2_enc.c \
../../../cximage/jasper/jpc/jpc_bs.c \
../../../cximage/jasper/jpc/jpc_cs.c \
../../../cximage/jasper/jpc/jpc_dec.c \
../../../cximage/jasper/jpc/jpc_enc.c \
../../../cximage/jasper/jpc/jpc_math.c \
../../../cximage/jasper/jpc/jpc_mct.c \
../../../cximage/jasper/jpc/jpc_mqcod.c \
../../../cximage/jasper/jpc/jpc_mqdec.c \
../../../cximage/jasper/jpc/jpc_mqenc.c \
../../../cximage/jasper/jpc/jpc_qmfb.c \
../../../cximage/jasper/jpc/jpc_t1cod.c \
../../../cximage/jasper/jpc/jpc_t1dec.c \
../../../cximage/jasper/jpc/jpc_t1enc.c \
../../../cximage/jasper/jpc/jpc_t2cod.c \
../../../cximage/jasper/jpc/jpc_t2dec.c \
../../../cximage/jasper/jpc/jpc_t2enc.c \
../../../cximage/jasper/jpc/jpc_tagtree.c \
../../../cximage/jasper/jpc/jpc_tsfb.c \
../../../cximage/jasper/jpc/jpc_util.c \
../../../cximage/jasper/jpg/jpg_dummy.c \
../../../cximage/jasper/jpg/jpg_val.c \
../../../cximage/jasper/mif/mif_cod.c \
../../../cximage/jasper/pgx/pgx_cod.c \
../../../cximage/jasper/pgx/pgx_dec.c \
../../../cximage/jasper/pgx/pgx_enc.c \
../../../cximage/jasper/pnm/pnm_cod.c \
../../../cximage/jasper/pnm/pnm_dec.c \
../../../cximage/jasper/pnm/pnm_enc.c \
../../../cximage/jasper/ras/ras_cod.c \
../../../cximage/jasper/ras/ras_dec.c \
../../../cximage/jasper/ras/ras_enc.c \
\
../../../cximage/jbig/jbig.c \
../../../cximage/jbig/jbig_tab.c \
\
../../../cximage/jpeg/wrtarga.c \
../../../cximage/jpeg/wrrle.c \
../../../cximage/jpeg/wrppm.c \
../../../cximage/jpeg/wrjpgcom.c \
../../../cximage/jpeg/wrgif.c \
../../../cximage/jpeg/wrbmp.c \
../../../cximage/jpeg/transupp.c \
../../../cximage/jpeg/rdtarga.c \
../../../cximage/jpeg/rdswitch.c \
../../../cximage/jpeg/rdrle.c \
../../../cximage/jpeg/rdppm.c \
../../../cximage/jpeg/rdjpgcom.c \
../../../cximage/jpeg/rdgif.c \
../../../cximage/jpeg/rdcolmap.c \
../../../cximage/jpeg/rdbmp.c \
../../../cximage/jpeg/jutils.c \
../../../cximage/jpeg/jpegtran.c \
../../../cximage/jpeg/jquant1.c \
../../../cximage/jpeg/jquant2.c \
../../../cximage/jpeg/jdpostct.c \
../../../cximage/jpeg/jdsample.c \
../../../cximage/jpeg/jdtrans.c \
../../../cximage/jpeg/jerror.c \
../../../cximage/jpeg/jfdctflt.c \
../../../cximage/jpeg/jfdctfst.c \
../../../cximage/jpeg/jfdctint.c \
../../../cximage/jpeg/jidctflt.c \
../../../cximage/jpeg/jidctfst.c \
../../../cximage/jpeg/jidctint.c \
../../../cximage/jpeg/jmemansi.c \
../../../cximage/jpeg/jmemmgr.c \
../../../cximage/jpeg/jmemname.c \
../../../cximage/jpeg/jmemnobs.c \
../../../cximage/jpeg/jaricom.c \
../../../cximage/jpeg/jcapimin.c \
../../../cximage/jpeg/jcapistd.c \
../../../cximage/jpeg/jcarith.c \
../../../cximage/jpeg/jccoefct.c \
../../../cximage/jpeg/jccolor.c \
../../../cximage/jpeg/jcdctmgr.c \
../../../cximage/jpeg/jchuff.c \
../../../cximage/jpeg/jcinit.c \
../../../cximage/jpeg/jcmainct.c \
../../../cximage/jpeg/jcmarker.c \
../../../cximage/jpeg/jcmaster.c \
../../../cximage/jpeg/jcomapi.c \
../../../cximage/jpeg/jcparam.c \
../../../cximage/jpeg/jcprepct.c \
../../../cximage/jpeg/jcsample.c \
../../../cximage/jpeg/jctrans.c \
../../../cximage/jpeg/jdapimin.c \
../../../cximage/jpeg/jdapistd.c \
../../../cximage/jpeg/jdarith.c \
../../../cximage/jpeg/jdatadst.c \
../../../cximage/jpeg/jdatasrc.c \
../../../cximage/jpeg/jdcoefct.c \
../../../cximage/jpeg/jdcolor.c \
../../../cximage/jpeg/jddctmgr.c \
../../../cximage/jpeg/jdhuff.c \
../../../cximage/jpeg/jdinput.c \
../../../cximage/jpeg/jdmainct.c \
../../../cximage/jpeg/jdmarker.c \
../../../cximage/jpeg/jdmaster.c \
../../../cximage/jpeg/jdmerge.c \
../../../cximage/jpeg/cdjpeg.c \
../../../cximage/jpeg/cjpeg.c \
../../../cximage/jpeg/ckconfig.c \
../../../cximage/jpeg/djpeg.c \
../../../cximage/jpeg/example.c \
\
../../../cximage/libpsd/adjustment.c \
../../../cximage/libpsd/bevel_emboss.c \
../../../cximage/libpsd/bitmap.c \
../../../cximage/libpsd/blend.c \
../../../cximage/libpsd/boundary.c \
../../../cximage/libpsd/brightness_contrast.c \
../../../cximage/libpsd/channel_image.c \
../../../cximage/libpsd/channel_mixer.c \
../../../cximage/libpsd/color_balance.c \
../../../cximage/libpsd/color_mode.c \
../../../cximage/libpsd/color_overlay.c \
../../../cximage/libpsd/color.c \
../../../cximage/libpsd/curves.c \
../../../cximage/libpsd/descriptor.c \
../../../cximage/libpsd/drop_shadow.c \
../../../cximage/libpsd/effects.c \
../../../cximage/libpsd/file_header.c \
../../../cximage/libpsd/fixed.c \
../../../cximage/libpsd/gaussian_blur.c \
../../../cximage/libpsd/gradient_blend.c \
../../../cximage/libpsd/gradient_fill.c \
../../../cximage/libpsd/gradient_map.c \
../../../cximage/libpsd/gradient_overlay.c \
../../../cximage/libpsd/hue_saturation.c \
../../../cximage/libpsd/image_data.c \
../../../cximage/libpsd/image_resource.c \
../../../cximage/libpsd/inner_glow.c \
../../../cximage/libpsd/inner_shadow.c \
../../../cximage/libpsd/invert.c \
../../../cximage/libpsd/layer_mask.c \
../../../cximage/libpsd/levels.c \
../../../cximage/libpsd/outer_glow.c \
../../../cximage/libpsd/path.c \
../../../cximage/libpsd/pattern_fill.c \
../../../cximage/libpsd/pattern_overlay.c \
../../../cximage/libpsd/pattern.c \
../../../cximage/libpsd/photo_filter.c \
../../../cximage/libpsd/posterize.c \
../../../cximage/libpsd/psd_system.c \
../../../cximage/libpsd/psd_zip.c \
../../../cximage/libpsd/psd.c \
../../../cximage/libpsd/rect.c \
../../../cximage/libpsd/satin.c \
../../../cximage/libpsd/selective_color.c \
../../../cximage/libpsd/solid_color.c \
../../../cximage/libpsd/stream.c \
../../../cximage/libpsd/stroke.c \
../../../cximage/libpsd/threshold.c \
../../../cximage/libpsd/thumbnail.c \
../../../cximage/libpsd/type_tool.c \
\
../../../cximage/mng/libmng_callback_xs.c \
../../../cximage/mng/libmng_chunk_descr.c \
../../../cximage/mng/libmng_chunk_io.c \
../../../cximage/mng/libmng_chunk_prc.c \
../../../cximage/mng/libmng_chunk_xs.c \
../../../cximage/mng/libmng_cms.c \
../../../cximage/mng/libmng_display.c \
../../../cximage/mng/libmng_dither.c \
../../../cximage/mng/libmng_error.c \
../../../cximage/mng/libmng_filter.c \
../../../cximage/mng/libmng_hlapi.c \
../../../cximage/mng/libmng_jpeg.c \
../../../cximage/mng/libmng_object_prc.c \
../../../cximage/mng/libmng_pixels.c \
../../../cximage/mng/libmng_prop_xs.c \
../../../cximage/mng/libmng_read.c \
../../../cximage/mng/libmng_trace.c \
../../../cximage/mng/libmng_write.c \
../../../cximage/mng/libmng_zlib.c \
\
../../../cximage/png/png.c \
../../../cximage/png/pngerror.c \
../../../cximage/png/pngget.c \
../../../cximage/png/pngmem.c \
../../../cximage/png/pngpread.c \
../../../cximage/png/pngread.c \
../../../cximage/png/pngrio.c \
../../../cximage/png/pngrtran.c \
../../../cximage/png/pngrutil.c \
../../../cximage/png/pngset.c \
../../../cximage/png/pngtrans.c \
../../../cximage/png/pngwio.c \
../../../cximage/png/pngwrite.c \
../../../cximage/png/pngwtran.c \
../../../cximage/png/pngwutil.c \
\
../../../cximage/raw/libdcr.c \
\
../../../cximage/tiff/tif_stream.cxx \
../../../cximage/tiff/tif_aux.c \
../../../cximage/tiff/tif_close.c \
../../../cximage/tiff/tif_codec.c \
../../../cximage/tiff/tif_color.c \
../../../cximage/tiff/tif_compress.c \
../../../cximage/tiff/tif_dir.c \
../../../cximage/tiff/tif_dirinfo.c \
../../../cximage/tiff/tif_dirread.c \
../../../cximage/tiff/tif_dirwrite.c \
../../../cximage/tiff/tif_dumpmode.c \
../../../cximage/tiff/tif_error.c \
../../../cximage/tiff/tif_extension.c \
../../../cximage/tiff/tif_fax3.c \
../../../cximage/tiff/tif_fax3sm.c \
../../../cximage/tiff/tif_flush.c \
../../../cximage/tiff/tif_getimage.c \
../../../cximage/tiff/tif_jbig.c \
../../../cximage/tiff/tif_jpeg.c \
../../../cximage/tiff/tif_luv.c \
../../../cximage/tiff/tif_lzw.c \
../../../cximage/tiff/tif_next.c \
../../../cximage/tiff/tif_ojpeg.c \
../../../cximage/tiff/tif_open.c \
../../../cximage/tiff/tif_packbits.c \
../../../cximage/tiff/tif_pixarlog.c \
../../../cximage/tiff/tif_predict.c \
../../../cximage/tiff/tif_print.c \
../../../cximage/tiff/tif_read.c \
../../../cximage/tiff/tif_strip.c \
../../../cximage/tiff/tif_swab.c \
../../../cximage/tiff/tif_thunder.c \
../../../cximage/tiff/tif_tile.c \
../../../cximage/tiff/tif_unix.c \
../../../cximage/tiff/tif_version.c \
../../../cximage/tiff/tif_warning.c \
../../../cximage/tiff/tif_write.c \
../../../cximage/tiff/tif_zip.c \
\
../../../cximage/zlib/crc32.c \
../../../cximage/zlib/adler32.c \
../../../cximage/zlib/deflate.c \
../../../cximage/zlib/inffast.c \
../../../cximage/zlib/inflate.c \
../../../cximage/zlib/inftrees.c \
../../../cximage/zlib/trees.c \
../../../cximage/zlib/zutil.c \
../../../cximage/zlib/uncompr.c \
../../../cximage/zlib/compress.c \
\
../../../cximage/CxImage/tif_xfile.cpp \
../../../cximage/CxImage/ximabmp.cpp \
../../../cximage/CxImage/ximadsp.cpp \
../../../cximage/CxImage/ximaenc.cpp \
../../../cximage/CxImage/ximaexif.cpp \
../../../cximage/CxImage/ximage.cpp \
../../../cximage/CxImage/ximagif.cpp \
../../../cximage/CxImage/ximahist.cpp \
../../../cximage/CxImage/ximaico.cpp \
../../../cximage/CxImage/ximainfo.cpp \
../../../cximage/CxImage/ximaint.cpp \
../../../cximage/CxImage/ximajas.cpp \
../../../cximage/CxImage/ximajbg.cpp \
../../../cximage/CxImage/ximajpg.cpp \
../../../cximage/CxImage/ximalpha.cpp \
../../../cximage/CxImage/ximalyr.cpp \
../../../cximage/CxImage/ximamng.cpp \
../../../cximage/CxImage/ximapal.cpp \
../../../cximage/CxImage/ximapcx.cpp \
../../../cximage/CxImage/ximapng.cpp \
../../../cximage/CxImage/ximapsd.cpp \
../../../cximage/CxImage/ximaraw.cpp \
../../../cximage/CxImage/ximasel.cpp \
../../../cximage/CxImage/ximaska.cpp \
../../../cximage/CxImage/ximatga.cpp \
../../../cximage/CxImage/ximath.cpp \
../../../cximage/CxImage/ximatif.cpp \
../../../cximage/CxImage/ximatran.cpp \
../../../cximage/CxImage/ximawbmp.cpp \
../../../cximage/CxImage/ximawmf.cpp \
../../../cximage/CxImage/ximawnd.cpp \
../../../cximage/CxImage/xmemfile.cpp \
../../../raster/BgraFrame.cpp \
../../../raster/Jp2/J2kFile.cpp \
../../../raster/Jp2/Reader.cpp \
../../../raster/Metafile/Common/MetaFileTypes.cpp \
../../../raster/Metafile/Common/MetaFileUtils.cpp \
../../../raster/Metafile/Emf/EmfClip.cpp \
../../../raster/Metafile/Emf/EmfObjects.cpp \
../../../raster/Metafile/Emf/EmfPath.cpp \
../../../raster/Metafile/Emf/EmfPlayer.cpp \
../../../raster/Metafile/Wmf/WmfClip.cpp \
../../../raster/Metafile/Wmf/WmfObjects.cpp \
../../../raster/Metafile/Wmf/WmfPlayer.cpp \
../../../raster/Metafile/MetaFile.cpp \
../../../raster/JBig2/source/JBig2File.cpp \
../../../raster/JBig2/source/Encoder/jbig2arith.cpp \
../../../raster/JBig2/source/Encoder/jbig2enc.cpp \
../../../raster/JBig2/source/Encoder/jbig2sym.cpp \
../../../raster/JBig2/source/LeptonLib/adaptmap.cpp \
../../../raster/JBig2/source/LeptonLib/affine.cpp \
../../../raster/JBig2/source/LeptonLib/affinecompose.cpp \
../../../raster/JBig2/source/LeptonLib/arithlow.cpp \
../../../raster/JBig2/source/LeptonLib/arrayaccess.cpp \
../../../raster/JBig2/source/LeptonLib/bardecode.cpp \
../../../raster/JBig2/source/LeptonLib/baseline.cpp \
../../../raster/JBig2/source/LeptonLib/bbuffer.cpp \
../../../raster/JBig2/source/LeptonLib/bilinear.cpp \
../../../raster/JBig2/source/LeptonLib/binarize.cpp \
../../../raster/JBig2/source/LeptonLib/binexpand.cpp \
../../../raster/JBig2/source/LeptonLib/binexpandlow.cpp \
../../../raster/JBig2/source/LeptonLib/binreduce.cpp \
../../../raster/JBig2/source/LeptonLib/binreducelow.cpp \
../../../raster/JBig2/source/LeptonLib/bmf.cpp \
../../../raster/JBig2/source/LeptonLib/bmpio.cpp \
../../../raster/JBig2/source/LeptonLib/bmpiostub.cpp \
../../../raster/JBig2/source/LeptonLib/boxbasic.cpp \
../../../raster/JBig2/source/LeptonLib/boxfunc1.cpp \
../../../raster/JBig2/source/LeptonLib/boxfunc2.cpp \
../../../raster/JBig2/source/LeptonLib/boxfunc3.cpp \
../../../raster/JBig2/source/LeptonLib/ccbord.cpp \
../../../raster/JBig2/source/LeptonLib/ccthin.cpp \
../../../raster/JBig2/source/LeptonLib/classapp.cpp \
../../../raster/JBig2/source/LeptonLib/colorcontent.cpp \
../../../raster/JBig2/source/LeptonLib/colormap.cpp \
../../../raster/JBig2/source/LeptonLib/colormorph.cpp \
../../../raster/JBig2/source/LeptonLib/colorquant1.cpp \
../../../raster/JBig2/source/LeptonLib/colorquant2.cpp \
../../../raster/JBig2/source/LeptonLib/colorseg.cpp \
../../../raster/JBig2/source/LeptonLib/compare.cpp \
../../../raster/JBig2/source/LeptonLib/conncomp.cpp \
../../../raster/JBig2/source/LeptonLib/convertfiles.cpp \
../../../raster/JBig2/source/LeptonLib/convolve.cpp \
../../../raster/JBig2/source/LeptonLib/convolvelow.cpp \
../../../raster/JBig2/source/LeptonLib/correlscore.cpp \
../../../raster/JBig2/source/LeptonLib/dewarp.cpp \
../../../raster/JBig2/source/LeptonLib/dwacomb.2.cpp \
../../../raster/JBig2/source/LeptonLib/dwacomblow.2.cpp \
../../../raster/JBig2/source/LeptonLib/edge.cpp \
../../../raster/JBig2/source/LeptonLib/enhance.cpp \
../../../raster/JBig2/source/LeptonLib/fhmtauto.cpp \
../../../raster/JBig2/source/LeptonLib/fhmtgen.1.cpp \
../../../raster/JBig2/source/LeptonLib/fhmtgenlow.1.cpp \
../../../raster/JBig2/source/LeptonLib/finditalic.cpp \
../../../raster/JBig2/source/LeptonLib/flipdetect.cpp \
../../../raster/JBig2/source/LeptonLib/fliphmtgen.cpp \
../../../raster/JBig2/source/LeptonLib/fmorphauto.cpp \
../../../raster/JBig2/source/LeptonLib/fmorphgen.1.cpp \
../../../raster/JBig2/source/LeptonLib/fmorphgenlow.1.cpp \
../../../raster/JBig2/source/LeptonLib/fpix1.cpp \
../../../raster/JBig2/source/LeptonLib/fpix2.cpp \
../../../raster/JBig2/source/LeptonLib/freetype.cpp \
../../../raster/JBig2/source/LeptonLib/gifio.cpp \
../../../raster/JBig2/source/LeptonLib/gifiostub.cpp \
../../../raster/JBig2/source/LeptonLib/gplot.cpp \
../../../raster/JBig2/source/LeptonLib/graphics.cpp \
../../../raster/JBig2/source/LeptonLib/graymorph.cpp \
../../../raster/JBig2/source/LeptonLib/graymorphlow.cpp \
../../../raster/JBig2/source/LeptonLib/grayquant.cpp \
../../../raster/JBig2/source/LeptonLib/grayquantlow.cpp \
../../../raster/JBig2/source/LeptonLib/heap.cpp \
../../../raster/JBig2/source/LeptonLib/jbclass.cpp \
../../../raster/JBig2/source/LeptonLib/jpegio.cpp \
../../../raster/JBig2/source/LeptonLib/jpegiostub.cpp \
../../../raster/JBig2/source/LeptonLib/kernel.cpp \
../../../raster/JBig2/source/LeptonLib/list.cpp \
../../../raster/JBig2/source/LeptonLib/maze.cpp \
../../../raster/JBig2/source/LeptonLib/morph.cpp \
../../../raster/JBig2/source/LeptonLib/morphapp.cpp \
../../../raster/JBig2/source/LeptonLib/morphdwa.cpp \
../../../raster/JBig2/source/LeptonLib/morphseq.cpp \
../../../raster/JBig2/source/LeptonLib/numabasic.cpp \
../../../raster/JBig2/source/LeptonLib/numafunc1.cpp \
../../../raster/JBig2/source/LeptonLib/numafunc2.cpp \
../../../raster/JBig2/source/LeptonLib/pageseg.cpp \
../../../raster/JBig2/source/LeptonLib/paintcmap.cpp \
../../../raster/JBig2/source/LeptonLib/parseprotos.cpp \
../../../raster/JBig2/source/LeptonLib/partition.cpp \
../../../raster/JBig2/source/LeptonLib/pix1.cpp \
../../../raster/JBig2/source/LeptonLib/pix2.cpp \
../../../raster/JBig2/source/LeptonLib/pix3.cpp \
../../../raster/JBig2/source/LeptonLib/pix4.cpp \
../../../raster/JBig2/source/LeptonLib/pix5.cpp \
../../../raster/JBig2/source/LeptonLib/pixabasic.cpp \
../../../raster/JBig2/source/LeptonLib/pixacc.cpp \
../../../raster/JBig2/source/LeptonLib/pixafunc1.cpp \
../../../raster/JBig2/source/LeptonLib/pixafunc2.cpp \
../../../raster/JBig2/source/LeptonLib/pixalloc.cpp \
../../../raster/JBig2/source/LeptonLib/pixarith.cpp \
../../../raster/JBig2/source/LeptonLib/pixcomp.cpp \
../../../raster/JBig2/source/LeptonLib/pixconv.cpp \
../../../raster/JBig2/source/LeptonLib/pixtiling.cpp \
../../../raster/JBig2/source/LeptonLib/pngio.cpp \
../../../raster/JBig2/source/LeptonLib/pngiostub.cpp \
../../../raster/JBig2/source/LeptonLib/pnmio.cpp \
../../../raster/JBig2/source/LeptonLib/pnmiostub.cpp \
../../../raster/JBig2/source/LeptonLib/projective.cpp \
../../../raster/JBig2/source/LeptonLib/psio1.cpp \
../../../raster/JBig2/source/LeptonLib/psio1stub.cpp \
../../../raster/JBig2/source/LeptonLib/psio2.cpp \
../../../raster/JBig2/source/LeptonLib/psio2stub.cpp \
../../../raster/JBig2/source/LeptonLib/ptabasic.cpp \
../../../raster/JBig2/source/LeptonLib/ptafunc1.cpp \
../../../raster/JBig2/source/LeptonLib/ptra.cpp \
../../../raster/JBig2/source/LeptonLib/queue.cpp \
../../../raster/JBig2/source/LeptonLib/rank.cpp \
../../../raster/JBig2/source/LeptonLib/readbarcode.cpp \
../../../raster/JBig2/source/LeptonLib/readfile.cpp \
../../../raster/JBig2/source/LeptonLib/regutils.cpp \
../../../raster/JBig2/source/LeptonLib/rop.cpp \
../../../raster/JBig2/source/LeptonLib/ropiplow.cpp \
../../../raster/JBig2/source/LeptonLib/roplow.cpp \
../../../raster/JBig2/source/LeptonLib/rotate.cpp \
../../../raster/JBig2/source/LeptonLib/rotateam.cpp \
../../../raster/JBig2/source/LeptonLib/rotateamlow.cpp \
../../../raster/JBig2/source/LeptonLib/rotateorth.cpp \
../../../raster/JBig2/source/LeptonLib/rotateorthlow.cpp \
../../../raster/JBig2/source/LeptonLib/rotateshear.cpp \
../../../raster/JBig2/source/LeptonLib/runlength.cpp \
../../../raster/JBig2/source/LeptonLib/sarray.cpp \
../../../raster/JBig2/source/LeptonLib/scale.cpp \
../../../raster/JBig2/source/LeptonLib/scalelow.cpp \
../../../raster/JBig2/source/LeptonLib/seedfill.cpp \
../../../raster/JBig2/source/LeptonLib/seedfilllow.cpp \
../../../raster/JBig2/source/LeptonLib/sel1.cpp \
../../../raster/JBig2/source/LeptonLib/sel2.cpp \
../../../raster/JBig2/source/LeptonLib/selgen.cpp \
../../../raster/JBig2/source/LeptonLib/shear.cpp \
../../../raster/JBig2/source/LeptonLib/skew.cpp \
../../../raster/JBig2/source/LeptonLib/spixio.cpp \
../../../raster/JBig2/source/LeptonLib/stack.cpp \
../../../raster/JBig2/source/LeptonLib/sudoku.cpp \
../../../raster/JBig2/source/LeptonLib/textops.cpp \
../../../raster/JBig2/source/LeptonLib/tiffio.cpp \
../../../raster/JBig2/source/LeptonLib/tiffiostub.cpp \
../../../raster/JBig2/source/LeptonLib/utils.cpp \
../../../raster/JBig2/source/LeptonLib/viewfiles.cpp \
../../../raster/JBig2/source/LeptonLib/warper.cpp \
../../../raster/JBig2/source/LeptonLib/watershed.cpp \
../../../raster/JBig2/source/LeptonLib/webpio.cpp \
../../../raster/JBig2/source/LeptonLib/webpiostub.cpp \
../../../raster/JBig2/source/LeptonLib/writefile.cpp \
../../../raster/JBig2/source/LeptonLib/zlibmem.cpp \
../../../raster/JBig2/source/LeptonLib/zlibmemstub.cpp \
../../../raster/ImageFileFormatChecker.cpp \
../../../cximage/libpsd/test.c \
../../../raster/JBig2/source/LeptonLib/blend1.cpp
HEADERS += \
../../../graphics/AggPlusEnums.h \
../../../graphics/aggplustypes.h \
../../../graphics/ArrowHead.h \
../../../graphics/BaseThread.h \
../../../graphics/Brush.h \
../../../graphics/Clip.h \
../../../graphics/Color.h \
../../../graphics/Defines.h \
../../../graphics/Graphics.h \
../../../graphics/GraphicsPath.h \
../../../graphics/GraphicsRenderer.h \
../../../graphics/Image.h \
../../../graphics/ImageFilesCache.h \
../../../graphics/IRenderer.h \
../../../graphics/Matrix.h \
../../../graphics/structures.h \
../../../graphics/TemporaryCS.h \
../../../graphics/Timer.h \
\
../../../agg-2.4/include/agg_vcgen_bspline.h \
../../../agg-2.4/include/agg_vcgen_contour.h \
../../../agg-2.4/include/agg_vcgen_dash.h \
../../../agg-2.4/include/agg_vcgen_markers_term.h \
../../../agg-2.4/include/agg_vcgen_smooth_poly1.h \
../../../agg-2.4/include/agg_vcgen_stroke.h \
../../../agg-2.4/include/agg_vcgen_vertex_sequence.h \
\
../../../freetype-2.5.2/include/config/ftconfig.h \
../../../freetype-2.5.2/include/config/ftheader.h \
../../../freetype-2.5.2/include/config/ftmodule.h \
../../../freetype-2.5.2/include/config/ftoption.h \
../../../freetype-2.5.2/include/config/ftstdlib.h \
../../../freetype-2.5.2/include/ft2build.h \
\
../../../fontengine/ApplicationFonts.h \
../../../fontengine/FontFile.h \
../../../fontengine/FontManager.h \
../../../fontengine/FontPath.h \
../../../fontengine/GlyphString.h \
\
../../../cximage/jasper/bmp/bmp_cod.h \
../../../cximage/jasper/bmp/bmp_enc.h \
../../../cximage/jasper/jp2/jp2_cod.h \
../../../cximage/jasper/jp2/jp2_dec.h \
../../../cximage/jasper/jpc/jpc_bs.h \
../../../cximage/jasper/jpc/jpc_cod.h \
../../../cximage/jasper/jpc/jpc_cs.h \
../../../cximage/jasper/jpc/jpc_dec.h \
../../../cximage/jasper/jpc/jpc_enc.h \
../../../cximage/jasper/jpc/jpc_fix.h \
../../../cximage/jasper/jpc/jpc_flt.h \
../../../cximage/jasper/jpc/jpc_math.h \
../../../cximage/jasper/jpc/jpc_mct.h \
../../../cximage/jasper/jpc/jpc_mqcod.h \
../../../cximage/jasper/jpc/jpc_mqdec.h \
../../../cximage/jasper/jpc/jpc_mqenc.h \
../../../cximage/jasper/jpc/jpc_qmfb.h \
../../../cximage/jasper/jpc/jpc_t1cod.h \
../../../cximage/jasper/jpc/jpc_t1dec.h \
../../../cximage/jasper/jpc/jpc_t1enc.h \
../../../cximage/jasper/jpc/jpc_t2cod.h \
../../../cximage/jasper/jpc/jpc_t2dec.h \
../../../cximage/jasper/jpc/jpc_t2enc.h \
../../../cximage/jasper/jpc/jpc_tagtree.h \
../../../cximage/jasper/jpc/jpc_tsfb.h \
../../../cximage/jasper/jpc/jpc_util.h \
../../../cximage/jasper/jpg/jpg_cod.h \
../../../cximage/jasper/jpg/jpg_enc.h \
../../../cximage/jasper/mif/mif_cod.h \
../../../cximage/jasper/pgx/pgx_cod.h \
../../../cximage/jasper/pgx/pgx_enc.h \
../../../cximage/jasper/pnm/pnm_cod.h \
../../../cximage/jasper/pnm/pnm_enc.h \
../../../cximage/jasper/ras/ras_cod.h \
../../../cximage/jasper/ras/ras_enc.h \
../../../cximage/jasper/include/jasper/jas_icc.h \
../../../cximage/jasper/include/jasper/jas_cm.h \
../../../cximage/jasper/include/jasper/jas_image.h \
\
../../../cximage/jbig/jbig.h \
\
../../../cximage/jpeg/transupp.h \
../../../cximage/jpeg/jversion.h \
../../../cximage/jpeg/jpegint.h \
../../../cximage/jpeg/jpeglib.h \
../../../cximage/jpeg/jerror.h \
../../../cximage/jpeg/jinclude.h \
../../../cximage/jpeg/jmemsys.h \
../../../cximage/jpeg/jmorecfg.h \
../../../cximage/jpeg/jconfig.h \
../../../cximage/jpeg/jdct.h \
../../../cximage/jpeg/cderror.h \
../../../cximage/jpeg/cdjpeg.h \
\
../../../cximage/libpsd/libpsd.h \
../../../cximage/libpsd/psd_bitmap.h \
../../../cximage/libpsd/psd_blend.h \
../../../cximage/libpsd/psd_color.h \
../../../cximage/libpsd/psd_config.h \
../../../cximage/libpsd/psd_descriptor.h \
../../../cximage/libpsd/psd_fixed.h \
../../../cximage/libpsd/psd_gradient.h \
../../../cximage/libpsd/psd_math.h \
../../../cximage/libpsd/psd_rect.h \
../../../cximage/libpsd/psd_stream.h \
../../../cximage/libpsd/psd_system.h \
../../../cximage/libpsd/psd_types.h \
\
../../../cximage/mng/libmng_chunk_descr.h \
../../../cximage/mng/libmng_chunk_io.h \
../../../cximage/mng/libmng_chunk_prc.h \
../../../cximage/mng/libmng_chunks.h \
../../../cximage/mng/libmng_cms.h \
../../../cximage/mng/libmng_conf.h \
../../../cximage/mng/libmng_data.h \
../../../cximage/mng/libmng_display.h \
../../../cximage/mng/libmng_dither.h \
../../../cximage/mng/libmng_error.h \
../../../cximage/mng/libmng_filter.h \
../../../cximage/mng/libmng_jpeg.h \
../../../cximage/mng/libmng_memory.h \
../../../cximage/mng/libmng_object_prc.h \
../../../cximage/mng/libmng_objects.h \
../../../cximage/mng/libmng_pixels.h \
../../../cximage/mng/libmng_read.h \
../../../cximage/mng/libmng_trace.h \
../../../cximage/mng/libmng_types.h \
../../../cximage/mng/libmng_write.h \
../../../cximage/mng/libmng_zlib.h \
../../../cximage/mng/libmng.h \
\
../../../cximage/png/png.h \
../../../cximage/png/pngconf.h \
\
../../../cximage/raw/libdcr.h \
\
../../../cximage/tiff/t4.h \
../../../cximage/tiff/tif_config.h \
../../../cximage/tiff/tif_config.wince.h \
../../../cximage/tiff/tif_dir.h \
../../../cximage/tiff/tif_fax3.h \
../../../cximage/tiff/tif_predict.h \
../../../cximage/tiff/tiff.h \
../../../cximage/tiff/tiffconf.h \
../../../cximage/tiff/tiffconf.wince.h \
../../../cximage/tiff/tiffio.h \
../../../cximage/tiff/tiffio.hxx \
../../../cximage/tiff/tiffiop.h \
../../../cximage/tiff/tiffvers.h \
../../../cximage/tiff/uvcode.h \
\
../../../cximage/zlib/crc32.h \
../../../cximage/zlib/deflate.h \
../../../cximage/zlib/inffast.h \
../../../cximage/zlib/inflate.h \
../../../cximage/zlib/inffixed.h \
../../../cximage/zlib/inftrees.h \
../../../cximage/zlib/trees.h \
../../../cximage/zlib/zconf.h \
../../../cximage/zlib/zconf.h.in \
../../../cximage/zlib/zlib.h \
../../../cximage/zlib/zutil.h \
\
../../../cximage/CxImage/stdint.h \
../../../cximage/CxImage/xfile.h \
../../../cximage/CxImage/ximabmp.h \
../../../cximage/CxImage/ximacfg.h \
../../../cximage/CxImage/ximadef.h \
../../../cximage/CxImage/ximage.h \
../../../cximage/CxImage/ximagif.h \
../../../cximage/CxImage/ximaico.h \
../../../cximage/CxImage/ximaiter.h \
../../../cximage/CxImage/ximajas.h \
../../../cximage/CxImage/ximajbg.h \
../../../cximage/CxImage/ximamng.h \
../../../cximage/CxImage/ximajpg.h \
../../../cximage/CxImage/ximapcx.h \
../../../cximage/CxImage/ximapng.h \
../../../cximage/CxImage/ximapsd.h \
../../../cximage/CxImage/ximaraw.h \
../../../cximage/CxImage/ximaska.h \
../../../cximage/CxImage/ximatga.h \
../../../cximage/CxImage/ximath.h \
../../../cximage/CxImage/ximatif.h \
../../../cximage/CxImage/ximawmf.h \
../../../cximage/CxImage/ximawbmp.h \
../../../cximage/CxImage/xiofile.h \
../../../cximage/CxImage/xmemfile.h \
../../../raster/BgraFrame.h \
../../../raster/ImageFileFormatChecker.h \
../../../raster/Metafile/Common/IOutputDevice.h \
../../../raster/Metafile/Common/MetaFile.h \
../../../raster/Metafile/Common/MetaFileClip.h \
../../../raster/Metafile/Common/MetaFileObjects.h \
../../../raster/Metafile/Common/MetaFileRenderer.h \
../../../raster/Metafile/Common/MetaFileTypes.h \
../../../raster/Metafile/Common/MetaFileUtils.h \
../../../raster/Metafile/Emf/EmfClip.h \
../../../raster/Metafile/Emf/EmfFile.h \
../../../raster/Metafile/Emf/EmfObjects.h \
../../../raster/Metafile/Emf/EmfPath.h \
../../../raster/Metafile/Emf/EmfPlayer.h \
../../../raster/Metafile/Emf/EmfTypes.h \
../../../raster/Metafile/Wmf/WmfClip.h \
../../../raster/Metafile/Wmf/WmfFile.h \
../../../raster/Metafile/Wmf/WmfObjects.h \
../../../raster/Metafile/Wmf/WmfPlayer.h \
../../../raster/Metafile/Wmf/WmfTypes.h \
../../../raster/Metafile/MetaFile.h \
../../../raster/JBig2/source/JBig2File.h \
../../../raster/JBig2/source/Utils.h \
../../../raster/JBig2/source/Encoder/jbig2arith.h \
../../../raster/JBig2/source/Encoder/jbig2enc.h \
../../../raster/JBig2/source/Encoder/jbig2encoder.h \
../../../raster/JBig2/source/Encoder/jbig2segments.h \
../../../raster/JBig2/source/Encoder/jbig2structs.h \
../../../raster/JBig2/source/Encoder/jbig2sym.h \
../../../raster/JBig2/source/LeptonLib/additionaltypes.h \
../../../raster/JBig2/source/LeptonLib/allheaders.h \
../../../raster/JBig2/source/LeptonLib/alltypes.h \
../../../raster/JBig2/source/LeptonLib/array.h \
../../../raster/JBig2/source/LeptonLib/arrayaccess.h \
../../../raster/JBig2/source/LeptonLib/bbuffer.h \
../../../raster/JBig2/source/LeptonLib/bmf.h \
../../../raster/JBig2/source/LeptonLib/bmp.h \
../../../raster/JBig2/source/LeptonLib/ccbord.h \
../../../raster/JBig2/source/LeptonLib/dewarp.h \
../../../raster/JBig2/source/LeptonLib/endianness.h \
../../../raster/JBig2/source/LeptonLib/environ.h \
../../../raster/JBig2/source/LeptonLib/freetype.h \
../../../raster/JBig2/source/LeptonLib/funcprotos.h \
../../../raster/JBig2/source/LeptonLib/gplot.h \
../../../raster/JBig2/source/LeptonLib/heap.h \
../../../raster/JBig2/source/LeptonLib/imageio.h \
../../../raster/JBig2/source/LeptonLib/jbclass.h \
../../../raster/JBig2/source/LeptonLib/list.h \
../../../raster/JBig2/source/LeptonLib/morph.h \
../../../raster/JBig2/source/LeptonLib/pix.h \
../../../raster/JBig2/source/LeptonLib/ptra.h \
../../../raster/JBig2/source/LeptonLib/queue.h \
../../../raster/JBig2/source/LeptonLib/readbarcode.h \
../../../raster/JBig2/source/LeptonLib/regutils.h \
../../../raster/JBig2/source/LeptonLib/stack.h \
../../../raster/JBig2/source/LeptonLib/sudoku.h \
../../../raster/JBig2/source/LeptonLib/watershed.h \
../../../raster/Jp2/ArithmeticCoder.h \
../../../raster/Jp2/DWT.h \
../../../raster/Jp2/Image.h \
../../../raster/Jp2/J2k.h \
../../../raster/Jp2/J2kFile.h \
../../../raster/Jp2/J2kIncludes.h \
../../../raster/Jp2/Jp2.h \
../../../raster/Jp2/JpgEvent.h \
../../../raster/Jp2/Jpt.h \
../../../raster/Jp2/Mj2.h \
../../../raster/Jp2/PacketIterator.h \
../../../raster/Jp2/Raw.h \
../../../raster/Jp2/Reader.h \
../../../raster/Jp2/Stream.h \
../../../raster/Jp2/TagTree.h \
../../../raster/Jp2/Tier1.h \
../../../raster/Jp2/Tier2.h \
../../../raster/Jp2/Tile.h \
../../../raster/Jp2/Types.h \
../../../raster/Jp2/Utils.h
unix {
target.path = /usr/lib
INSTALLS += target
}
DISTFILES += \
../../../cximage/libpsd/ChangeLog \
../../../cximage/libpsd/COPYING \
../../../cximage/libpsd/CUSTOMIZE
#-------------------------------------------------
#
# Project created by QtCreator 2014-03-15T18:33:57
#
#-------------------------------------------------
QT -= core gui
TARGET = graphics
TEMPLATE = lib
CONFIG += staticlib
DEFINES += \
_QT \
FT2_BUILD_LIBRARY \
EXCLUDE_JPG_SUPPORT \
MNG_SUPPORT_DISPLAY \
MNG_SUPPORT_READ \
MNG_SUPPORT_WRITE \
MNG_ACCESS_CHUNKS \
MNG_STORE_CHUNKS\
MNG_ERROR_TELLTALE
linux-g++ | linux-g++-64 | linux-g++-32 {
DEFINES += \
HAVE_UNISTD_H \
LINUX \
_LINUX \
_LINUX_QT
CONFIG += c++11
message(linux)
}
mac {
DEFINES += \
HAVE_UNISTD_H \
_LINUX \
_LINUX_QT \
_MAC \
QT_MAC
message(mac)
}
win32 {
DEFINES += \
JAS_WIN_MSVC_BUILD \
WIN32
DEFINES -= UNICODE
message(windows)
}
INCLUDEPATH += \
../../../agg-2.4/include \
../../../freetype-2.5.2/include \
../../../cximage/jasper/include \
../../../cximage/jpeg \
../../../cximage/png \
../../../cximage/zlib
SOURCES += \
../../../graphics/ArrowHead.cpp \
../../../graphics/Brush.cpp \
../../../graphics/Clip.cpp \
../../../graphics/Graphics.cpp \
../../../graphics/GraphicsPath.cpp \
../../../graphics/GraphicsRenderer.cpp \
../../../graphics/Image.cpp \
../../../graphics/Matrix.cpp \
../../../graphics/TemporaryCS.cpp \
\
../../../agg-2.4/src/agg_arc.cpp \
../../../agg-2.4/src/agg_bezier_arc.cpp \
../../../agg-2.4/src/agg_arrowhead.cpp \
../../../agg-2.4/src/ctrl/agg_cbox_ctrl.cpp \
../../../agg-2.4/src/agg_curves.cpp \
../../../agg-2.4/src/agg_gsv_text.cpp \
../../../agg-2.4/src/agg_image_filters.cpp \
../../../agg-2.4/src/agg_line_aa_basics.cpp \
../../../agg-2.4/src/agg_line_profile_aa.cpp \
../../../agg-2.4/src/agg_rounded_rect.cpp \
../../../agg-2.4/src/agg_sqrt_tables.cpp \
../../../agg-2.4/src/agg_trans_affine.cpp \
../../../agg-2.4/src/agg_vcgen_bspline.cpp \
../../../agg-2.4/src/agg_vcgen_contour.cpp \
../../../agg-2.4/src/agg_vcgen_dash.cpp \
../../../agg-2.4/src/agg_vcgen_markers_term.cpp \
../../../agg-2.4/src/agg_vcgen_smooth_poly1.cpp \
../../../agg-2.4/src/agg_vcgen_stroke.cpp \
\
../../../freetype-2.5.2/src/base/ftbbox.c \
../../../freetype-2.5.2/src/base/ftgxval.c \
../../../freetype-2.5.2/src/base/ftlcdfil.c \
../../../freetype-2.5.2/src/base/ftmm.c \
../../../freetype-2.5.2/src/base/ftotval.c \
../../../freetype-2.5.2/src/base/ftpatent.c \
../../../freetype-2.5.2/src/base/ftpfr.c \
../../../freetype-2.5.2/src/base/ftsynth.c \
../../../freetype-2.5.2/src/base/fttype1.c \
../../../freetype-2.5.2/src/base/ftwinfnt.c \
../../../freetype-2.5.2/src/base/ftxf86.c \
../../../freetype-2.5.2/src/pcf/pcf.c \
../../../freetype-2.5.2/src/pfr/pfr.c \
../../../freetype-2.5.2/src/psaux/psaux.c \
../../../freetype-2.5.2/src/pshinter/pshinter.c \
../../../freetype-2.5.2/src/psnames/psmodule.c \
../../../freetype-2.5.2/src/raster/raster.c \
../../../freetype-2.5.2/src/sfnt/sfnt.c \
../../../freetype-2.5.2/src/truetype/truetype.c \
../../../freetype-2.5.2/src/type1/type1.c \
../../../freetype-2.5.2/src/cid/type1cid.c \
../../../freetype-2.5.2/src/type42/type42.c \
../../../freetype-2.5.2/src/winfonts/winfnt.c \
\
../../../freetype-2.5.2/src/autofit/autofit.c \
../../../freetype-2.5.2/src/bdf/bdf.c \
../../../freetype-2.5.2/src/cff/cff.c \
../../../freetype-2.5.2/src/base/ftbase.c \
../../../freetype-2.5.2/src/base/ftbitmap.c \
../../../freetype-2.5.2/src/cache/ftcache.c \
../../../freetype-2.5.2/src/base/ftfstype.c \
../../../freetype-2.5.2/src/base/ftgasp.c \
../../../freetype-2.5.2/src/base/ftglyph.c \
../../../freetype-2.5.2/src/gzip/ftgzip.c \
../../../freetype-2.5.2/src/base/ftinit.c \
../../../freetype-2.5.2/src/lzw/ftlzw.c \
../../../freetype-2.5.2/src/base/ftstroke.c \
../../../freetype-2.5.2/src/base/ftsystem.c \
../../../freetype-2.5.2/src/smooth/smooth.c \
\
../../../fontengine/ApplicationFonts.cpp \
../../../fontengine/FontFile.cpp \
../../../fontengine/FontManager.cpp \
../../../fontengine/FontPath.cpp \
../../../fontengine/GlyphString.cpp \
\
../../../cximage/jasper/base/jas_cm.c \
../../../cximage/jasper/base/jas_debug.c \
../../../cximage/jasper/base/jas_getopt.c \
../../../cximage/jasper/base/jas_icc.c \
../../../cximage/jasper/base/jas_iccdata.c \
../../../cximage/jasper/base/jas_image.c \
../../../cximage/jasper/base/jas_init.c \
../../../cximage/jasper/base/jas_malloc.c \
../../../cximage/jasper/base/jas_stream.c \
../../../cximage/jasper/base/jas_seq.c \
../../../cximage/jasper/base/jas_string.c \
../../../cximage/jasper/base/jas_tvp.c \
../../../cximage/jasper/base/jas_version.c \
../../../cximage/jasper/bmp/bmp_cod.c \
../../../cximage/jasper/bmp/bmp_dec.c \
../../../cximage/jasper/bmp/bmp_enc.c \
../../../cximage/jasper/jp2/jp2_cod.c \
../../../cximage/jasper/jp2/jp2_dec.c \
../../../cximage/jasper/jp2/jp2_enc.c \
../../../cximage/jasper/jpc/jpc_bs.c \
../../../cximage/jasper/jpc/jpc_cs.c \
../../../cximage/jasper/jpc/jpc_dec.c \
../../../cximage/jasper/jpc/jpc_enc.c \
../../../cximage/jasper/jpc/jpc_math.c \
../../../cximage/jasper/jpc/jpc_mct.c \
../../../cximage/jasper/jpc/jpc_mqcod.c \
../../../cximage/jasper/jpc/jpc_mqdec.c \
../../../cximage/jasper/jpc/jpc_mqenc.c \
../../../cximage/jasper/jpc/jpc_qmfb.c \
../../../cximage/jasper/jpc/jpc_t1cod.c \
../../../cximage/jasper/jpc/jpc_t1dec.c \
../../../cximage/jasper/jpc/jpc_t1enc.c \
../../../cximage/jasper/jpc/jpc_t2cod.c \
../../../cximage/jasper/jpc/jpc_t2dec.c \
../../../cximage/jasper/jpc/jpc_t2enc.c \
../../../cximage/jasper/jpc/jpc_tagtree.c \
../../../cximage/jasper/jpc/jpc_tsfb.c \
../../../cximage/jasper/jpc/jpc_util.c \
../../../cximage/jasper/jpg/jpg_dummy.c \
../../../cximage/jasper/jpg/jpg_val.c \
../../../cximage/jasper/mif/mif_cod.c \
../../../cximage/jasper/pgx/pgx_cod.c \
../../../cximage/jasper/pgx/pgx_dec.c \
../../../cximage/jasper/pgx/pgx_enc.c \
../../../cximage/jasper/pnm/pnm_cod.c \
../../../cximage/jasper/pnm/pnm_dec.c \
../../../cximage/jasper/pnm/pnm_enc.c \
../../../cximage/jasper/ras/ras_cod.c \
../../../cximage/jasper/ras/ras_dec.c \
../../../cximage/jasper/ras/ras_enc.c \
\
../../../cximage/jbig/jbig.c \
../../../cximage/jbig/jbig_tab.c \
\
../../../cximage/jpeg/wrtarga.c \
../../../cximage/jpeg/wrrle.c \
../../../cximage/jpeg/wrppm.c \
../../../cximage/jpeg/wrjpgcom.c \
../../../cximage/jpeg/wrgif.c \
../../../cximage/jpeg/wrbmp.c \
../../../cximage/jpeg/transupp.c \
../../../cximage/jpeg/rdtarga.c \
../../../cximage/jpeg/rdswitch.c \
../../../cximage/jpeg/rdrle.c \
../../../cximage/jpeg/rdppm.c \
../../../cximage/jpeg/rdjpgcom.c \
../../../cximage/jpeg/rdgif.c \
../../../cximage/jpeg/rdcolmap.c \
../../../cximage/jpeg/rdbmp.c \
../../../cximage/jpeg/jutils.c \
../../../cximage/jpeg/jpegtran.c \
../../../cximage/jpeg/jquant1.c \
../../../cximage/jpeg/jquant2.c \
../../../cximage/jpeg/jdpostct.c \
../../../cximage/jpeg/jdsample.c \
../../../cximage/jpeg/jdtrans.c \
../../../cximage/jpeg/jerror.c \
../../../cximage/jpeg/jfdctflt.c \
../../../cximage/jpeg/jfdctfst.c \
../../../cximage/jpeg/jfdctint.c \
../../../cximage/jpeg/jidctflt.c \
../../../cximage/jpeg/jidctfst.c \
../../../cximage/jpeg/jidctint.c \
../../../cximage/jpeg/jmemansi.c \
../../../cximage/jpeg/jmemmgr.c \
../../../cximage/jpeg/jmemname.c \
../../../cximage/jpeg/jmemnobs.c \
../../../cximage/jpeg/jaricom.c \
../../../cximage/jpeg/jcapimin.c \
../../../cximage/jpeg/jcapistd.c \
../../../cximage/jpeg/jcarith.c \
../../../cximage/jpeg/jccoefct.c \
../../../cximage/jpeg/jccolor.c \
../../../cximage/jpeg/jcdctmgr.c \
../../../cximage/jpeg/jchuff.c \
../../../cximage/jpeg/jcinit.c \
../../../cximage/jpeg/jcmainct.c \
../../../cximage/jpeg/jcmarker.c \
../../../cximage/jpeg/jcmaster.c \
../../../cximage/jpeg/jcomapi.c \
../../../cximage/jpeg/jcparam.c \
../../../cximage/jpeg/jcprepct.c \
../../../cximage/jpeg/jcsample.c \
../../../cximage/jpeg/jctrans.c \
../../../cximage/jpeg/jdapimin.c \
../../../cximage/jpeg/jdapistd.c \
../../../cximage/jpeg/jdarith.c \
../../../cximage/jpeg/jdatadst.c \
../../../cximage/jpeg/jdatasrc.c \
../../../cximage/jpeg/jdcoefct.c \
../../../cximage/jpeg/jdcolor.c \
../../../cximage/jpeg/jddctmgr.c \
../../../cximage/jpeg/jdhuff.c \
../../../cximage/jpeg/jdinput.c \
../../../cximage/jpeg/jdmainct.c \
../../../cximage/jpeg/jdmarker.c \
../../../cximage/jpeg/jdmaster.c \
../../../cximage/jpeg/jdmerge.c \
../../../cximage/jpeg/cdjpeg.c \
../../../cximage/jpeg/cjpeg.c \
../../../cximage/jpeg/ckconfig.c \
../../../cximage/jpeg/djpeg.c \
../../../cximage/jpeg/example.c \
\
../../../cximage/libpsd/adjustment.c \
../../../cximage/libpsd/bevel_emboss.c \
../../../cximage/libpsd/bitmap.c \
../../../cximage/libpsd/blend.c \
../../../cximage/libpsd/boundary.c \
../../../cximage/libpsd/brightness_contrast.c \
../../../cximage/libpsd/channel_image.c \
../../../cximage/libpsd/channel_mixer.c \
../../../cximage/libpsd/color_balance.c \
../../../cximage/libpsd/color_mode.c \
../../../cximage/libpsd/color_overlay.c \
../../../cximage/libpsd/color.c \
../../../cximage/libpsd/curves.c \
../../../cximage/libpsd/descriptor.c \
../../../cximage/libpsd/drop_shadow.c \
../../../cximage/libpsd/effects.c \
../../../cximage/libpsd/file_header.c \
../../../cximage/libpsd/fixed.c \
../../../cximage/libpsd/gaussian_blur.c \
../../../cximage/libpsd/gradient_blend.c \
../../../cximage/libpsd/gradient_fill.c \
../../../cximage/libpsd/gradient_map.c \
../../../cximage/libpsd/gradient_overlay.c \
../../../cximage/libpsd/hue_saturation.c \
../../../cximage/libpsd/image_data.c \
../../../cximage/libpsd/image_resource.c \
../../../cximage/libpsd/inner_glow.c \
../../../cximage/libpsd/inner_shadow.c \
../../../cximage/libpsd/invert.c \
../../../cximage/libpsd/layer_mask.c \
../../../cximage/libpsd/levels.c \
../../../cximage/libpsd/outer_glow.c \
../../../cximage/libpsd/path.c \
../../../cximage/libpsd/pattern_fill.c \
../../../cximage/libpsd/pattern_overlay.c \
../../../cximage/libpsd/pattern.c \
../../../cximage/libpsd/photo_filter.c \
../../../cximage/libpsd/posterize.c \
../../../cximage/libpsd/psd_system.c \
../../../cximage/libpsd/psd_zip.c \
../../../cximage/libpsd/psd.c \
../../../cximage/libpsd/rect.c \
../../../cximage/libpsd/satin.c \
../../../cximage/libpsd/selective_color.c \
../../../cximage/libpsd/solid_color.c \
../../../cximage/libpsd/stream.c \
../../../cximage/libpsd/stroke.c \
../../../cximage/libpsd/threshold.c \
../../../cximage/libpsd/thumbnail.c \
../../../cximage/libpsd/type_tool.c \
\
../../../cximage/mng/libmng_callback_xs.c \
../../../cximage/mng/libmng_chunk_descr.c \
../../../cximage/mng/libmng_chunk_io.c \
../../../cximage/mng/libmng_chunk_prc.c \
../../../cximage/mng/libmng_chunk_xs.c \
../../../cximage/mng/libmng_cms.c \
../../../cximage/mng/libmng_display.c \
../../../cximage/mng/libmng_dither.c \
../../../cximage/mng/libmng_error.c \
../../../cximage/mng/libmng_filter.c \
../../../cximage/mng/libmng_hlapi.c \
../../../cximage/mng/libmng_jpeg.c \
../../../cximage/mng/libmng_object_prc.c \
../../../cximage/mng/libmng_pixels.c \
../../../cximage/mng/libmng_prop_xs.c \
../../../cximage/mng/libmng_read.c \
../../../cximage/mng/libmng_trace.c \
../../../cximage/mng/libmng_write.c \
../../../cximage/mng/libmng_zlib.c \
\
../../../cximage/png/png.c \
../../../cximage/png/pngerror.c \
../../../cximage/png/pngget.c \
../../../cximage/png/pngmem.c \
../../../cximage/png/pngpread.c \
../../../cximage/png/pngread.c \
../../../cximage/png/pngrio.c \
../../../cximage/png/pngrtran.c \
../../../cximage/png/pngrutil.c \
../../../cximage/png/pngset.c \
../../../cximage/png/pngtrans.c \
../../../cximage/png/pngwio.c \
../../../cximage/png/pngwrite.c \
../../../cximage/png/pngwtran.c \
../../../cximage/png/pngwutil.c \
\
../../../cximage/raw/libdcr.c \
\
../../../cximage/tiff/tif_stream.cxx \
../../../cximage/tiff/tif_aux.c \
../../../cximage/tiff/tif_close.c \
../../../cximage/tiff/tif_codec.c \
../../../cximage/tiff/tif_color.c \
../../../cximage/tiff/tif_compress.c \
../../../cximage/tiff/tif_dir.c \
../../../cximage/tiff/tif_dirinfo.c \
../../../cximage/tiff/tif_dirread.c \
../../../cximage/tiff/tif_dirwrite.c \
../../../cximage/tiff/tif_dumpmode.c \
../../../cximage/tiff/tif_error.c \
../../../cximage/tiff/tif_extension.c \
../../../cximage/tiff/tif_fax3.c \
../../../cximage/tiff/tif_fax3sm.c \
../../../cximage/tiff/tif_flush.c \
../../../cximage/tiff/tif_getimage.c \
../../../cximage/tiff/tif_jbig.c \
../../../cximage/tiff/tif_jpeg.c \
../../../cximage/tiff/tif_luv.c \
../../../cximage/tiff/tif_lzw.c \
../../../cximage/tiff/tif_next.c \
../../../cximage/tiff/tif_ojpeg.c \
../../../cximage/tiff/tif_open.c \
../../../cximage/tiff/tif_packbits.c \
../../../cximage/tiff/tif_pixarlog.c \
../../../cximage/tiff/tif_predict.c \
../../../cximage/tiff/tif_print.c \
../../../cximage/tiff/tif_read.c \
../../../cximage/tiff/tif_strip.c \
../../../cximage/tiff/tif_swab.c \
../../../cximage/tiff/tif_thunder.c \
../../../cximage/tiff/tif_tile.c \
../../../cximage/tiff/tif_unix.c \
../../../cximage/tiff/tif_version.c \
../../../cximage/tiff/tif_warning.c \
../../../cximage/tiff/tif_write.c \
../../../cximage/tiff/tif_zip.c \
\
../../../cximage/zlib/crc32.c \
../../../cximage/zlib/adler32.c \
../../../cximage/zlib/deflate.c \
../../../cximage/zlib/inffast.c \
../../../cximage/zlib/inflate.c \
../../../cximage/zlib/inftrees.c \
../../../cximage/zlib/trees.c \
../../../cximage/zlib/zutil.c \
../../../cximage/zlib/uncompr.c \
../../../cximage/zlib/compress.c \
\
../../../cximage/CxImage/tif_xfile.cpp \
../../../cximage/CxImage/ximabmp.cpp \
../../../cximage/CxImage/ximadsp.cpp \
../../../cximage/CxImage/ximaenc.cpp \
../../../cximage/CxImage/ximaexif.cpp \
../../../cximage/CxImage/ximage.cpp \
../../../cximage/CxImage/ximagif.cpp \
../../../cximage/CxImage/ximahist.cpp \
../../../cximage/CxImage/ximaico.cpp \
../../../cximage/CxImage/ximainfo.cpp \
../../../cximage/CxImage/ximaint.cpp \
../../../cximage/CxImage/ximajas.cpp \
../../../cximage/CxImage/ximajbg.cpp \
../../../cximage/CxImage/ximajpg.cpp \
../../../cximage/CxImage/ximalpha.cpp \
../../../cximage/CxImage/ximalyr.cpp \
../../../cximage/CxImage/ximamng.cpp \
../../../cximage/CxImage/ximapal.cpp \
../../../cximage/CxImage/ximapcx.cpp \
../../../cximage/CxImage/ximapng.cpp \
../../../cximage/CxImage/ximapsd.cpp \
../../../cximage/CxImage/ximaraw.cpp \
../../../cximage/CxImage/ximasel.cpp \
../../../cximage/CxImage/ximaska.cpp \
../../../cximage/CxImage/ximatga.cpp \
../../../cximage/CxImage/ximath.cpp \
../../../cximage/CxImage/ximatif.cpp \
../../../cximage/CxImage/ximatran.cpp \
../../../cximage/CxImage/ximawbmp.cpp \
../../../cximage/CxImage/ximawmf.cpp \
../../../cximage/CxImage/ximawnd.cpp \
../../../cximage/CxImage/xmemfile.cpp \
../../../raster/BgraFrame.cpp \
../../../raster/Jp2/J2kFile.cpp \
../../../raster/Jp2/Reader.cpp \
../../../raster/Metafile/Common/MetaFileTypes.cpp \
../../../raster/Metafile/Common/MetaFileUtils.cpp \
../../../raster/Metafile/Emf/EmfClip.cpp \
../../../raster/Metafile/Emf/EmfObjects.cpp \
../../../raster/Metafile/Emf/EmfPath.cpp \
../../../raster/Metafile/Emf/EmfPlayer.cpp \
../../../raster/Metafile/Wmf/WmfClip.cpp \
../../../raster/Metafile/Wmf/WmfObjects.cpp \
../../../raster/Metafile/Wmf/WmfPlayer.cpp \
../../../raster/Metafile/MetaFile.cpp \
../../../raster/JBig2/source/JBig2File.cpp \
../../../raster/JBig2/source/Encoder/jbig2arith.cpp \
../../../raster/JBig2/source/Encoder/jbig2enc.cpp \
../../../raster/JBig2/source/Encoder/jbig2sym.cpp \
../../../raster/JBig2/source/LeptonLib/adaptmap.cpp \
../../../raster/JBig2/source/LeptonLib/affine.cpp \
../../../raster/JBig2/source/LeptonLib/affinecompose.cpp \
../../../raster/JBig2/source/LeptonLib/arithlow.cpp \
../../../raster/JBig2/source/LeptonLib/arrayaccess.cpp \
../../../raster/JBig2/source/LeptonLib/bardecode.cpp \
../../../raster/JBig2/source/LeptonLib/baseline.cpp \
../../../raster/JBig2/source/LeptonLib/bbuffer.cpp \
../../../raster/JBig2/source/LeptonLib/bilinear.cpp \
../../../raster/JBig2/source/LeptonLib/binarize.cpp \
../../../raster/JBig2/source/LeptonLib/binexpand.cpp \
../../../raster/JBig2/source/LeptonLib/binexpandlow.cpp \
../../../raster/JBig2/source/LeptonLib/binreduce.cpp \
../../../raster/JBig2/source/LeptonLib/binreducelow.cpp \
../../../raster/JBig2/source/LeptonLib/bmf.cpp \
../../../raster/JBig2/source/LeptonLib/bmpio.cpp \
../../../raster/JBig2/source/LeptonLib/bmpiostub.cpp \
../../../raster/JBig2/source/LeptonLib/boxbasic.cpp \
../../../raster/JBig2/source/LeptonLib/boxfunc1.cpp \
../../../raster/JBig2/source/LeptonLib/boxfunc2.cpp \
../../../raster/JBig2/source/LeptonLib/boxfunc3.cpp \
../../../raster/JBig2/source/LeptonLib/ccbord.cpp \
../../../raster/JBig2/source/LeptonLib/ccthin.cpp \
../../../raster/JBig2/source/LeptonLib/classapp.cpp \
../../../raster/JBig2/source/LeptonLib/colorcontent.cpp \
../../../raster/JBig2/source/LeptonLib/colormap.cpp \
../../../raster/JBig2/source/LeptonLib/colormorph.cpp \
../../../raster/JBig2/source/LeptonLib/colorquant1.cpp \
../../../raster/JBig2/source/LeptonLib/colorquant2.cpp \
../../../raster/JBig2/source/LeptonLib/colorseg.cpp \
../../../raster/JBig2/source/LeptonLib/compare.cpp \
../../../raster/JBig2/source/LeptonLib/conncomp.cpp \
../../../raster/JBig2/source/LeptonLib/convertfiles.cpp \
../../../raster/JBig2/source/LeptonLib/convolve.cpp \
../../../raster/JBig2/source/LeptonLib/convolvelow.cpp \
../../../raster/JBig2/source/LeptonLib/correlscore.cpp \
../../../raster/JBig2/source/LeptonLib/dewarp.cpp \
../../../raster/JBig2/source/LeptonLib/dwacomb.2.cpp \
../../../raster/JBig2/source/LeptonLib/dwacomblow.2.cpp \
../../../raster/JBig2/source/LeptonLib/edge.cpp \
../../../raster/JBig2/source/LeptonLib/enhance.cpp \
../../../raster/JBig2/source/LeptonLib/fhmtauto.cpp \
../../../raster/JBig2/source/LeptonLib/fhmtgen.1.cpp \
../../../raster/JBig2/source/LeptonLib/fhmtgenlow.1.cpp \
../../../raster/JBig2/source/LeptonLib/finditalic.cpp \
../../../raster/JBig2/source/LeptonLib/flipdetect.cpp \
../../../raster/JBig2/source/LeptonLib/fliphmtgen.cpp \
../../../raster/JBig2/source/LeptonLib/fmorphauto.cpp \
../../../raster/JBig2/source/LeptonLib/fmorphgen.1.cpp \
../../../raster/JBig2/source/LeptonLib/fmorphgenlow.1.cpp \
../../../raster/JBig2/source/LeptonLib/fpix1.cpp \
../../../raster/JBig2/source/LeptonLib/fpix2.cpp \
../../../raster/JBig2/source/LeptonLib/freetype.cpp \
../../../raster/JBig2/source/LeptonLib/gifio.cpp \
../../../raster/JBig2/source/LeptonLib/gifiostub.cpp \
../../../raster/JBig2/source/LeptonLib/gplot.cpp \
../../../raster/JBig2/source/LeptonLib/graphics1.cpp \
../../../raster/JBig2/source/LeptonLib/graymorph.cpp \
../../../raster/JBig2/source/LeptonLib/graymorphlow.cpp \
../../../raster/JBig2/source/LeptonLib/grayquant.cpp \
../../../raster/JBig2/source/LeptonLib/grayquantlow.cpp \
../../../raster/JBig2/source/LeptonLib/heap.cpp \
../../../raster/JBig2/source/LeptonLib/jbclass.cpp \
../../../raster/JBig2/source/LeptonLib/jpegio.cpp \
../../../raster/JBig2/source/LeptonLib/jpegiostub.cpp \
../../../raster/JBig2/source/LeptonLib/kernel.cpp \
../../../raster/JBig2/source/LeptonLib/list.cpp \
../../../raster/JBig2/source/LeptonLib/maze.cpp \
../../../raster/JBig2/source/LeptonLib/morph.cpp \
../../../raster/JBig2/source/LeptonLib/morphapp.cpp \
../../../raster/JBig2/source/LeptonLib/morphdwa.cpp \
../../../raster/JBig2/source/LeptonLib/morphseq.cpp \
../../../raster/JBig2/source/LeptonLib/numabasic.cpp \
../../../raster/JBig2/source/LeptonLib/numafunc1.cpp \
../../../raster/JBig2/source/LeptonLib/numafunc2.cpp \
../../../raster/JBig2/source/LeptonLib/pageseg.cpp \
../../../raster/JBig2/source/LeptonLib/paintcmap.cpp \
../../../raster/JBig2/source/LeptonLib/parseprotos.cpp \
../../../raster/JBig2/source/LeptonLib/partition.cpp \
../../../raster/JBig2/source/LeptonLib/pix1.cpp \
../../../raster/JBig2/source/LeptonLib/pix2.cpp \
../../../raster/JBig2/source/LeptonLib/pix3.cpp \
../../../raster/JBig2/source/LeptonLib/pix4.cpp \
../../../raster/JBig2/source/LeptonLib/pix5.cpp \
../../../raster/JBig2/source/LeptonLib/pixabasic.cpp \
../../../raster/JBig2/source/LeptonLib/pixacc.cpp \
../../../raster/JBig2/source/LeptonLib/pixafunc1.cpp \
../../../raster/JBig2/source/LeptonLib/pixafunc2.cpp \
../../../raster/JBig2/source/LeptonLib/pixalloc.cpp \
../../../raster/JBig2/source/LeptonLib/pixarith.cpp \
../../../raster/JBig2/source/LeptonLib/pixcomp.cpp \
../../../raster/JBig2/source/LeptonLib/pixconv.cpp \
../../../raster/JBig2/source/LeptonLib/pixtiling.cpp \
../../../raster/JBig2/source/LeptonLib/pngio.cpp \
../../../raster/JBig2/source/LeptonLib/pngiostub.cpp \
../../../raster/JBig2/source/LeptonLib/pnmio.cpp \
../../../raster/JBig2/source/LeptonLib/pnmiostub.cpp \
../../../raster/JBig2/source/LeptonLib/projective.cpp \
../../../raster/JBig2/source/LeptonLib/psio1.cpp \
../../../raster/JBig2/source/LeptonLib/psio1stub.cpp \
../../../raster/JBig2/source/LeptonLib/psio2.cpp \
../../../raster/JBig2/source/LeptonLib/psio2stub.cpp \
../../../raster/JBig2/source/LeptonLib/ptabasic.cpp \
../../../raster/JBig2/source/LeptonLib/ptafunc1.cpp \
../../../raster/JBig2/source/LeptonLib/ptra.cpp \
../../../raster/JBig2/source/LeptonLib/queue.cpp \
../../../raster/JBig2/source/LeptonLib/rank.cpp \
../../../raster/JBig2/source/LeptonLib/readbarcode.cpp \
../../../raster/JBig2/source/LeptonLib/readfile.cpp \
../../../raster/JBig2/source/LeptonLib/regutils.cpp \
../../../raster/JBig2/source/LeptonLib/rop.cpp \
../../../raster/JBig2/source/LeptonLib/ropiplow.cpp \
../../../raster/JBig2/source/LeptonLib/roplow.cpp \
../../../raster/JBig2/source/LeptonLib/rotate.cpp \
../../../raster/JBig2/source/LeptonLib/rotateam.cpp \
../../../raster/JBig2/source/LeptonLib/rotateamlow.cpp \
../../../raster/JBig2/source/LeptonLib/rotateorth.cpp \
../../../raster/JBig2/source/LeptonLib/rotateorthlow.cpp \
../../../raster/JBig2/source/LeptonLib/rotateshear.cpp \
../../../raster/JBig2/source/LeptonLib/runlength.cpp \
../../../raster/JBig2/source/LeptonLib/sarray.cpp \
../../../raster/JBig2/source/LeptonLib/scale.cpp \
../../../raster/JBig2/source/LeptonLib/scalelow.cpp \
../../../raster/JBig2/source/LeptonLib/seedfill.cpp \
../../../raster/JBig2/source/LeptonLib/seedfilllow.cpp \
../../../raster/JBig2/source/LeptonLib/sel1.cpp \
../../../raster/JBig2/source/LeptonLib/sel2.cpp \
../../../raster/JBig2/source/LeptonLib/selgen.cpp \
../../../raster/JBig2/source/LeptonLib/shear.cpp \
../../../raster/JBig2/source/LeptonLib/skew.cpp \
../../../raster/JBig2/source/LeptonLib/spixio.cpp \
../../../raster/JBig2/source/LeptonLib/stack.cpp \
../../../raster/JBig2/source/LeptonLib/sudoku.cpp \
../../../raster/JBig2/source/LeptonLib/textops.cpp \
../../../raster/JBig2/source/LeptonLib/tiffio.cpp \
../../../raster/JBig2/source/LeptonLib/tiffiostub.cpp \
../../../raster/JBig2/source/LeptonLib/utils.cpp \
../../../raster/JBig2/source/LeptonLib/viewfiles.cpp \
../../../raster/JBig2/source/LeptonLib/warper.cpp \
../../../raster/JBig2/source/LeptonLib/watershed.cpp \
../../../raster/JBig2/source/LeptonLib/webpio.cpp \
../../../raster/JBig2/source/LeptonLib/webpiostub.cpp \
../../../raster/JBig2/source/LeptonLib/writefile.cpp \
../../../raster/JBig2/source/LeptonLib/zlibmem.cpp \
../../../raster/JBig2/source/LeptonLib/zlibmemstub.cpp \
../../../raster/ImageFileFormatChecker.cpp \
../../../cximage/libpsd/test.c \
../../../raster/JBig2/source/LeptonLib/blend1.cpp
HEADERS += \
../../../graphics/AggPlusEnums.h \
../../../graphics/aggplustypes.h \
../../../graphics/ArrowHead.h \
../../../graphics/BaseThread.h \
../../../graphics/Brush.h \
../../../graphics/Clip.h \
../../../graphics/Color.h \
../../../graphics/Defines.h \
../../../graphics/Graphics.h \
../../../graphics/GraphicsPath.h \
../../../graphics/GraphicsRenderer.h \
../../../graphics/Image.h \
../../../graphics/ImageFilesCache.h \
../../../graphics/IRenderer.h \
../../../graphics/Matrix.h \
../../../graphics/structures.h \
../../../graphics/TemporaryCS.h \
../../../graphics/Timer.h \
\
../../../agg-2.4/include/agg_vcgen_bspline.h \
../../../agg-2.4/include/agg_vcgen_contour.h \
../../../agg-2.4/include/agg_vcgen_dash.h \
../../../agg-2.4/include/agg_vcgen_markers_term.h \
../../../agg-2.4/include/agg_vcgen_smooth_poly1.h \
../../../agg-2.4/include/agg_vcgen_stroke.h \
../../../agg-2.4/include/agg_vcgen_vertex_sequence.h \
\
../../../freetype-2.5.2/include/config/ftconfig.h \
../../../freetype-2.5.2/include/config/ftheader.h \
../../../freetype-2.5.2/include/config/ftmodule.h \
../../../freetype-2.5.2/include/config/ftoption.h \
../../../freetype-2.5.2/include/config/ftstdlib.h \
../../../freetype-2.5.2/include/ft2build.h \
\
../../../fontengine/ApplicationFonts.h \
../../../fontengine/FontFile.h \
../../../fontengine/FontManager.h \
../../../fontengine/FontPath.h \
../../../fontengine/GlyphString.h \
\
../../../cximage/jasper/bmp/bmp_cod.h \
../../../cximage/jasper/bmp/bmp_enc.h \
../../../cximage/jasper/jp2/jp2_cod.h \
../../../cximage/jasper/jp2/jp2_dec.h \
../../../cximage/jasper/jpc/jpc_bs.h \
../../../cximage/jasper/jpc/jpc_cod.h \
../../../cximage/jasper/jpc/jpc_cs.h \
../../../cximage/jasper/jpc/jpc_dec.h \
../../../cximage/jasper/jpc/jpc_enc.h \
../../../cximage/jasper/jpc/jpc_fix.h \
../../../cximage/jasper/jpc/jpc_flt.h \
../../../cximage/jasper/jpc/jpc_math.h \
../../../cximage/jasper/jpc/jpc_mct.h \
../../../cximage/jasper/jpc/jpc_mqcod.h \
../../../cximage/jasper/jpc/jpc_mqdec.h \
../../../cximage/jasper/jpc/jpc_mqenc.h \
../../../cximage/jasper/jpc/jpc_qmfb.h \
../../../cximage/jasper/jpc/jpc_t1cod.h \
../../../cximage/jasper/jpc/jpc_t1dec.h \
../../../cximage/jasper/jpc/jpc_t1enc.h \
../../../cximage/jasper/jpc/jpc_t2cod.h \
../../../cximage/jasper/jpc/jpc_t2dec.h \
../../../cximage/jasper/jpc/jpc_t2enc.h \
../../../cximage/jasper/jpc/jpc_tagtree.h \
../../../cximage/jasper/jpc/jpc_tsfb.h \
../../../cximage/jasper/jpc/jpc_util.h \
../../../cximage/jasper/jpg/jpg_cod.h \
../../../cximage/jasper/jpg/jpg_enc.h \
../../../cximage/jasper/mif/mif_cod.h \
../../../cximage/jasper/pgx/pgx_cod.h \
../../../cximage/jasper/pgx/pgx_enc.h \
../../../cximage/jasper/pnm/pnm_cod.h \
../../../cximage/jasper/pnm/pnm_enc.h \
../../../cximage/jasper/ras/ras_cod.h \
../../../cximage/jasper/ras/ras_enc.h \
../../../cximage/jasper/include/jasper/jas_icc.h \
../../../cximage/jasper/include/jasper/jas_cm.h \
../../../cximage/jasper/include/jasper/jas_image.h \
\
../../../cximage/jbig/jbig.h \
\
../../../cximage/jpeg/transupp.h \
../../../cximage/jpeg/jversion.h \
../../../cximage/jpeg/jpegint.h \
../../../cximage/jpeg/jpeglib.h \
../../../cximage/jpeg/jerror.h \
../../../cximage/jpeg/jinclude.h \
../../../cximage/jpeg/jmemsys.h \
../../../cximage/jpeg/jmorecfg.h \
../../../cximage/jpeg/jconfig.h \
../../../cximage/jpeg/jdct.h \
../../../cximage/jpeg/cderror.h \
../../../cximage/jpeg/cdjpeg.h \
\
../../../cximage/libpsd/libpsd.h \
../../../cximage/libpsd/psd_bitmap.h \
../../../cximage/libpsd/psd_blend.h \
../../../cximage/libpsd/psd_color.h \
../../../cximage/libpsd/psd_config.h \
../../../cximage/libpsd/psd_descriptor.h \
../../../cximage/libpsd/psd_fixed.h \
../../../cximage/libpsd/psd_gradient.h \
../../../cximage/libpsd/psd_math.h \
../../../cximage/libpsd/psd_rect.h \
../../../cximage/libpsd/psd_stream.h \
../../../cximage/libpsd/psd_system.h \
../../../cximage/libpsd/psd_types.h \
\
../../../cximage/mng/libmng_chunk_descr.h \
../../../cximage/mng/libmng_chunk_io.h \
../../../cximage/mng/libmng_chunk_prc.h \
../../../cximage/mng/libmng_chunks.h \
../../../cximage/mng/libmng_cms.h \
../../../cximage/mng/libmng_conf.h \
../../../cximage/mng/libmng_data.h \
../../../cximage/mng/libmng_display.h \
../../../cximage/mng/libmng_dither.h \
../../../cximage/mng/libmng_error.h \
../../../cximage/mng/libmng_filter.h \
../../../cximage/mng/libmng_jpeg.h \
../../../cximage/mng/libmng_memory.h \
../../../cximage/mng/libmng_object_prc.h \
../../../cximage/mng/libmng_objects.h \
../../../cximage/mng/libmng_pixels.h \
../../../cximage/mng/libmng_read.h \
../../../cximage/mng/libmng_trace.h \
../../../cximage/mng/libmng_types.h \
../../../cximage/mng/libmng_write.h \
../../../cximage/mng/libmng_zlib.h \
../../../cximage/mng/libmng.h \
\
../../../cximage/png/png.h \
../../../cximage/png/pngconf.h \
\
../../../cximage/raw/libdcr.h \
\
../../../cximage/tiff/t4.h \
../../../cximage/tiff/tif_config.h \
../../../cximage/tiff/tif_config.wince.h \
../../../cximage/tiff/tif_dir.h \
../../../cximage/tiff/tif_fax3.h \
../../../cximage/tiff/tif_predict.h \
../../../cximage/tiff/tiff.h \
../../../cximage/tiff/tiffconf.h \
../../../cximage/tiff/tiffconf.wince.h \
../../../cximage/tiff/tiffio.h \
../../../cximage/tiff/tiffio.hxx \
../../../cximage/tiff/tiffiop.h \
../../../cximage/tiff/tiffvers.h \
../../../cximage/tiff/uvcode.h \
\
../../../cximage/zlib/crc32.h \
../../../cximage/zlib/deflate.h \
../../../cximage/zlib/inffast.h \
../../../cximage/zlib/inflate.h \
../../../cximage/zlib/inffixed.h \
../../../cximage/zlib/inftrees.h \
../../../cximage/zlib/trees.h \
../../../cximage/zlib/zconf.h \
../../../cximage/zlib/zconf.h.in \
../../../cximage/zlib/zlib.h \
../../../cximage/zlib/zutil.h \
\
../../../cximage/CxImage/stdint.h \
../../../cximage/CxImage/xfile.h \
../../../cximage/CxImage/ximabmp.h \
../../../cximage/CxImage/ximacfg.h \
../../../cximage/CxImage/ximadef.h \
../../../cximage/CxImage/ximage.h \
../../../cximage/CxImage/ximagif.h \
../../../cximage/CxImage/ximaico.h \
../../../cximage/CxImage/ximaiter.h \
../../../cximage/CxImage/ximajas.h \
../../../cximage/CxImage/ximajbg.h \
../../../cximage/CxImage/ximamng.h \
../../../cximage/CxImage/ximajpg.h \
../../../cximage/CxImage/ximapcx.h \
../../../cximage/CxImage/ximapng.h \
../../../cximage/CxImage/ximapsd.h \
../../../cximage/CxImage/ximaraw.h \
../../../cximage/CxImage/ximaska.h \
../../../cximage/CxImage/ximatga.h \
../../../cximage/CxImage/ximath.h \
../../../cximage/CxImage/ximatif.h \
../../../cximage/CxImage/ximawmf.h \
../../../cximage/CxImage/ximawbmp.h \
../../../cximage/CxImage/xiofile.h \
../../../cximage/CxImage/xmemfile.h \
../../../raster/BgraFrame.h \
../../../raster/ImageFileFormatChecker.h \
../../../raster/Metafile/Common/IOutputDevice.h \
../../../raster/Metafile/Common/MetaFile.h \
../../../raster/Metafile/Common/MetaFileClip.h \
../../../raster/Metafile/Common/MetaFileObjects.h \
../../../raster/Metafile/Common/MetaFileRenderer.h \
../../../raster/Metafile/Common/MetaFileTypes.h \
../../../raster/Metafile/Common/MetaFileUtils.h \
../../../raster/Metafile/Emf/EmfClip.h \
../../../raster/Metafile/Emf/EmfFile.h \
../../../raster/Metafile/Emf/EmfObjects.h \
../../../raster/Metafile/Emf/EmfPath.h \
../../../raster/Metafile/Emf/EmfPlayer.h \
../../../raster/Metafile/Emf/EmfTypes.h \
../../../raster/Metafile/Wmf/WmfClip.h \
../../../raster/Metafile/Wmf/WmfFile.h \
../../../raster/Metafile/Wmf/WmfObjects.h \
../../../raster/Metafile/Wmf/WmfPlayer.h \
../../../raster/Metafile/Wmf/WmfTypes.h \
../../../raster/Metafile/MetaFile.h \
../../../raster/JBig2/source/JBig2File.h \
../../../raster/JBig2/source/Utils.h \
../../../raster/JBig2/source/Encoder/jbig2arith.h \
../../../raster/JBig2/source/Encoder/jbig2enc.h \
../../../raster/JBig2/source/Encoder/jbig2encoder.h \
../../../raster/JBig2/source/Encoder/jbig2segments.h \
../../../raster/JBig2/source/Encoder/jbig2structs.h \
../../../raster/JBig2/source/Encoder/jbig2sym.h \
../../../raster/JBig2/source/LeptonLib/additionaltypes.h \
../../../raster/JBig2/source/LeptonLib/allheaders.h \
../../../raster/JBig2/source/LeptonLib/alltypes.h \
../../../raster/JBig2/source/LeptonLib/array.h \
../../../raster/JBig2/source/LeptonLib/arrayaccess.h \
../../../raster/JBig2/source/LeptonLib/bbuffer.h \
../../../raster/JBig2/source/LeptonLib/bmf.h \
../../../raster/JBig2/source/LeptonLib/bmp.h \
../../../raster/JBig2/source/LeptonLib/ccbord.h \
../../../raster/JBig2/source/LeptonLib/dewarp.h \
../../../raster/JBig2/source/LeptonLib/endianness.h \
../../../raster/JBig2/source/LeptonLib/environ.h \
../../../raster/JBig2/source/LeptonLib/freetype.h \
../../../raster/JBig2/source/LeptonLib/funcprotos.h \
../../../raster/JBig2/source/LeptonLib/gplot.h \
../../../raster/JBig2/source/LeptonLib/heap.h \
../../../raster/JBig2/source/LeptonLib/imageio.h \
../../../raster/JBig2/source/LeptonLib/jbclass.h \
../../../raster/JBig2/source/LeptonLib/list.h \
../../../raster/JBig2/source/LeptonLib/morph.h \
../../../raster/JBig2/source/LeptonLib/pix.h \
../../../raster/JBig2/source/LeptonLib/ptra.h \
../../../raster/JBig2/source/LeptonLib/queue.h \
../../../raster/JBig2/source/LeptonLib/readbarcode.h \
../../../raster/JBig2/source/LeptonLib/regutils.h \
../../../raster/JBig2/source/LeptonLib/stack.h \
../../../raster/JBig2/source/LeptonLib/sudoku.h \
../../../raster/JBig2/source/LeptonLib/watershed.h \
../../../raster/Jp2/ArithmeticCoder.h \
../../../raster/Jp2/DWT.h \
../../../raster/Jp2/Image.h \
../../../raster/Jp2/J2k.h \
../../../raster/Jp2/J2kFile.h \
../../../raster/Jp2/J2kIncludes.h \
../../../raster/Jp2/Jp2.h \
../../../raster/Jp2/JpgEvent.h \
../../../raster/Jp2/Jpt.h \
../../../raster/Jp2/Mj2.h \
../../../raster/Jp2/PacketIterator.h \
../../../raster/Jp2/Raw.h \
../../../raster/Jp2/Reader.h \
../../../raster/Jp2/Stream.h \
../../../raster/Jp2/TagTree.h \
../../../raster/Jp2/Tier1.h \
../../../raster/Jp2/Tier2.h \
../../../raster/Jp2/Tile.h \
../../../raster/Jp2/Types.h \
../../../raster/Jp2/Utils.h
unix {
target.path = /usr/lib
INSTALLS += target
}
DISTFILES += \
../../../cximage/libpsd/ChangeLog \
../../../cximage/libpsd/COPYING \
../../../cximage/libpsd/CUSTOMIZE
/*====================================================================*
- Copyright (C) 2001 Leptonica. All rights reserved.
- This software is distributed in the hope that it will be
- useful, but with NO WARRANTY OF ANY KIND.
- No author or distributor accepts responsibility to anyone for the
- consequences of using this software, or for whether it serves any
- particular purpose or works at all, unless he or she says so in
- writing. Everyone is granted permission to copy, modify and
- redistribute this source code, for commercial or non-commercial
- purposes, with the following restrictions: (1) the origin of this
- source code must not be misrepresented; (2) modified versions must
- be plainly marked as such; and (3) this notice may not be removed
- or altered from any source or modified source distribution.
*====================================================================*/
/*
* graphics.c
*
* Pta generation for arbitrary shapes built with lines
*
* PTA *generatePtaLine()
* PTA *generatePtaWideLine()
* PTA *generatePtaBox()
* PTA *generatePtaHashBox()
* PTA *generatePtaBoxa()
* PTAA *generatePtaaBoxa()
* PTAA *generatePtaaHashBoxa()
* PTA *generatePtaPolyline()
* PTA *generatePtaFilledCircle()
* PTA *generatePtaLineFromPt()
* l_int32 locatePtRadially()
*
* Pta rendering
*
* l_int32 pixRenderPta()
* l_int32 pixRenderPtaArb()
* l_int32 pixRenderPtaBlend()
*
* Rendering of arbitrary shapes built with lines
*
* l_int32 pixRenderLine()
* l_int32 pixRenderLineArb()
* l_int32 pixRenderLineBlend()
*
* l_int32 pixRenderBox()
* l_int32 pixRenderBoxArb()
* l_int32 pixRenderBoxBlend()
*
* l_int32 pixRenderHashBox()
* l_int32 pixRenderHashBoxArb()
* l_int32 pixRenderHashBoxBlend()
*
* l_int32 pixRenderBoxa()
* l_int32 pixRenderBoxaArb()
* l_int32 pixRenderBoxaBlend()
*
* l_int32 pixRenderPolyline()
* l_int32 pixRenderPolylineArb()
* l_int32 pixRenderPolylineBlend()
*
* l_int32 pixRenderRandomCmapPtaa()
*
* Contour rendering on grayscale images
*
* PIX *pixRenderContours()
* PIX *fpixRenderContours()
*
* The line rendering functions are relatively crude, but they
* get the job done for most simple situations. We use the pta
* as an intermediate data structure. A pta is generated
* for a line. One of two rendering functions are used to
* render this onto a Pix.
*/
#include <stdio.h>
#include <string.h>
#include <math.h>
#include "allheaders.h"
/*------------------------------------------------------------------*
* Pta generation for arbitrary shapes built with lines *
*------------------------------------------------------------------*/
/*!
* generatePtaLine()
*
* Input: x1, y1 (end point 1)
* x2, y2 (end point 2)
* Return: pta, or null on error
*/
PTA *
generatePtaLine(l_int32 x1,
l_int32 y1,
l_int32 x2,
l_int32 y2)
{
l_int32 npts, diff, getyofx, sign, i, x, y;
l_float32 slope;
PTA *pta;
PROCNAME("generatePtaLine");
/* Generate line parameters */
if (L_ABS(x2 - x1) >= L_ABS(y2 - y1)) {
getyofx = TRUE;
npts = L_ABS(x2 - x1) + 1;
diff = x2 - x1;
sign = L_SIGN(x2 - x1);
slope = (l_float32)(sign * (y2 - y1)) / (l_float32)diff;
}
else {
getyofx = FALSE;
npts = L_ABS(y2 - y1) + 1;
diff = y2 - y1;
sign = L_SIGN(y2 - y1);
slope = (l_float32)(sign * (x2 - x1)) / (l_float32)diff;
}
if ((pta = ptaCreate(npts)) == NULL)
return (PTA *)ERROR_PTR("pta not made", procName, NULL);
if (npts == 1) { /* degenerate case */
ptaAddPt(pta, x1, y1);
return pta;
}
/* Generate the set of points */
if (getyofx) { /* y = y(x) */
for (i = 0; i < npts; i++) {
x = x1 + sign * i;
y = (l_int32)(y1 + (l_float32)i * slope + 0.5);
ptaAddPt(pta, x, y);
}
}
else { /* x = x(y) */
for (i = 0; i < npts; i++) {
x = (l_int32)(x1 + (l_float32)i * slope + 0.5);
y = y1 + sign * i;
ptaAddPt(pta, x, y);
}
}
return pta;
}
/*!
* generatePtaWideLine()
*
* Input: x1, y1 (end point 1)
* x2, y2 (end point 2)
* width
* Return: ptaj, or null on error
*/
PTA *
generatePtaWideLine(l_int32 x1,
l_int32 y1,
l_int32 x2,
l_int32 y2,
l_int32 width)
{
l_int32 i, x1a, x2a, y1a, y2a;
PTA *pta, *ptaj;
PROCNAME("generatePtaWideLine");
if (width < 1) {
L_WARNING("width < 1; setting to 1", procName);
width = 1;
}
if ((ptaj = generatePtaLine(x1, y1, x2, y2)) == NULL)
return (PTA *)ERROR_PTR("ptaj not made", procName, NULL);
if (width == 1)
return ptaj;
/* width > 1; estimate line direction & join */
if (L_ABS(x1 - x2) > L_ABS(y1 - y2)) { /* "horizontal" line */
for (i = 1; i < width; i++) {
if ((i & 1) == 1) { /* place above */
y1a = y1 - (i + 1) / 2;
y2a = y2 - (i + 1) / 2;
}
else { /* place below */
y1a = y1 + (i + 1) / 2;
y2a = y2 + (i + 1) / 2;
}
if ((pta = generatePtaLine(x1, y1a, x2, y2a)) == NULL)
return (PTA *)ERROR_PTR("pta not made", procName, NULL);
ptaJoin(ptaj, pta, 0, 0);
ptaDestroy(&pta);
}
}
else { /* "vertical" line */
for (i = 1; i < width; i++) {
if ((i & 1) == 1) { /* place to left */
x1a = x1 - (i + 1) / 2;
x2a = x2 - (i + 1) / 2;
}
else { /* place to right */
x1a = x1 + (i + 1) / 2;
x2a = x2 + (i + 1) / 2;
}
if ((pta = generatePtaLine(x1a, y1, x2a, y2)) == NULL)
return (PTA *)ERROR_PTR("pta not made", procName, NULL);
ptaJoin(ptaj, pta, 0, 0);
ptaDestroy(&pta);
}
}
return ptaj;
}
/*!
* generatePtaBox()
*
* Input: box
* width (of line)
* Return: ptad, or null on error
*
* Notes:
* (1) Because the box is constructed so that we don't have any
* overlapping lines, there is no need to remove duplicates.
*/
PTA *
generatePtaBox(BOX *box,
l_int32 width)
{
l_int32 x, y, w, h;
PTA *ptad, *pta;
PROCNAME("generatePtaBox");
if (!box)
return (PTA *)ERROR_PTR("box not defined", procName, NULL);
/* Generate line points and add them to the pta. */
boxGetGeometry(box, &x, &y, &w, &h);
if (w == 0 || h == 0)
return (PTA *)ERROR_PTR("box has w = 0 or h = 0", procName, NULL);
ptad = ptaCreate(0);
if ((width & 1) == 1) { /* odd width */
pta = generatePtaWideLine(x - width / 2, y,
x + w - 1 + width / 2, y, width);
ptaJoin(ptad, pta, 0, 0);
ptaDestroy(&pta);
pta = generatePtaWideLine(x + w - 1, y + 1 + width / 2,
x + w - 1, y + h - 2 - width / 2, width);
ptaJoin(ptad, pta, 0, 0);
ptaDestroy(&pta);
pta = generatePtaWideLine(x + w - 1 + width / 2, y + h - 1,
x - width / 2, y + h - 1, width);
ptaJoin(ptad, pta, 0, 0);
ptaDestroy(&pta);
pta = generatePtaWideLine(x, y + h - 2 - width / 2,
x, y + 1 + width / 2, width);
ptaJoin(ptad, pta, 0, 0);
ptaDestroy(&pta);
}
else { /* even width */
pta = generatePtaWideLine(x - width / 2, y,
x + w - 2 + width / 2, y, width);
ptaJoin(ptad, pta, 0, 0);
ptaDestroy(&pta);
pta = generatePtaWideLine(x + w - 1, y + 0 + width / 2,
x + w - 1, y + h - 2 - width / 2, width);
ptaJoin(ptad, pta, 0, 0);
ptaDestroy(&pta);
pta = generatePtaWideLine(x + w - 2 + width / 2, y + h - 1,
x - width / 2, y + h - 1, width);
ptaJoin(ptad, pta, 0, 0);
ptaDestroy(&pta);
pta = generatePtaWideLine(x, y + h - 2 - width / 2,
x, y + 0 + width / 2, width);
ptaJoin(ptad, pta, 0, 0);
ptaDestroy(&pta);
}
return ptad;
}
/*!
* generatePtaHashBox()
*
* Input: box
* spacing (spacing between lines; must be > 1)
* width (of line)
* orient (orientation of lines: L_HORIZONTAL_LINE, ...)
* outline (0 to skip drawing box outline)
* Return: ptad, or null on error
*
* Notes:
* (1) The orientation takes on one of 4 orientations (horiz, vertical,
* slope +1, slope -1).
* (2) The full outline is also drawn if @outline = 1.
*/
PTA *
generatePtaHashBox(BOX *box,
l_int32 spacing,
l_int32 width,
l_int32 orient,
l_int32 outline)
{
l_int32 bx, by, bh, bw, x, y, x1, y1, x2, y2, i, n, npts;
PTA *ptad, *pta;
PROCNAME("generatePtaHashBox");
if (!box)
return (PTA *)ERROR_PTR("box not defined", procName, NULL);
if (spacing <= 1)
return (PTA *)ERROR_PTR("spacing not > 1", procName, NULL);
if (orient != L_HORIZONTAL_LINE && orient != L_POS_SLOPE_LINE &&
orient != L_VERTICAL_LINE && orient != L_NEG_SLOPE_LINE)
return (PTA *)ERROR_PTR("invalid line orientation", procName, NULL);
boxGetGeometry(box, &bx, &by, &bw, &bh);
if (bw == 0 || bh == 0)
return (PTA *)ERROR_PTR("box has bw = 0 or bh = 0", procName, NULL);
/* Generate line points and add them to the pta. */
ptad = ptaCreate(0);
if (outline) {
pta = generatePtaBox(box, width);
ptaJoin(ptad, pta, 0, 0);
ptaDestroy(&pta);
}
if (orient == L_HORIZONTAL_LINE) {
n = 1 + bh / spacing;
for (i = 0; i < n; i++) {
y = by + (i * (bh - 1)) / (n - 1);
pta = generatePtaWideLine(bx, y, bx + bw - 1, y, width);
ptaJoin(ptad, pta, 0, 0);
ptaDestroy(&pta);
}
}
else if (orient == L_VERTICAL_LINE) {
n = 1 + bw / spacing;
for (i = 0; i < n; i++) {
x = bx + (i * (bw - 1)) / (n - 1);
pta = generatePtaWideLine(x, by, x, by + bh - 1, width);
ptaJoin(ptad, pta, 0, 0);
ptaDestroy(&pta);
}
}
else if (orient == L_POS_SLOPE_LINE) {
n = 2 + (l_int32)((bw + bh) / (1.4 * spacing));
for (i = 0; i < n; i++) {
x = (l_int32)(bx + (i + 0.5) * 1.4 * spacing);
boxIntersectByLine(box, x, by - 1, 1.0, &x1, &y1, &x2, &y2, &npts);
if (npts == 2) {
pta = generatePtaWideLine(x1, y1, x2, y2, width);
ptaJoin(ptad, pta, 0, 0);
ptaDestroy(&pta);
}
}
}
else { /* orient == L_NEG_SLOPE_LINE */
n = 2 + (l_int32)((bw + bh) / (1.4 * spacing));
for (i = 0; i < n; i++) {
x = (l_int32)(bx - bh + (i + 0.5) * 1.4 * spacing);
boxIntersectByLine(box, x, by - 1, -1.0, &x1, &y1, &x2, &y2, &npts);
if (npts == 2) {
pta = generatePtaWideLine(x1, y1, x2, y2, width);
ptaJoin(ptad, pta, 0, 0);
ptaDestroy(&pta);
}
}
}
return ptad;
}
/*!
* generatePtaBoxa()
*
* Input: boxa
* width
* removedups (1 to remove, 0 to leave)
* Return: ptad, or null on error
*
* Notes:
* (1) If the boxa has overlapping boxes, and if blending will
* be used to give a transparent effect, transparency
* artifacts at line intersections can be removed using
* removedups = 1.
*/
PTA *
generatePtaBoxa(BOXA *boxa,
l_int32 width,
l_int32 removedups)
{
l_int32 i, n;
BOX *box;
PTA *ptad, *ptat, *pta;
PROCNAME("generatePtaBoxa");
if (!boxa)
return (PTA *)ERROR_PTR("boxa not defined", procName, NULL);
n = boxaGetCount(boxa);
ptat = ptaCreate(0);
for (i = 0; i < n; i++) {
box = boxaGetBox(boxa, i, L_CLONE);
pta = generatePtaBox(box, width);
ptaJoin(ptat, pta, 0, 0);
ptaDestroy(&pta);
boxDestroy(&box);
}
if (removedups)
ptad = ptaRemoveDuplicates(ptat, 0);
else
ptad = ptaClone(ptat);
ptaDestroy(&ptat);
return ptad;
}
/*!
* generatePtaaBoxa()
*
* Input: boxa
* Return: ptaa, or null on error
*
* Notes:
* (1) This generates a pta of the four corners for each box in
* the boxa.
* (2) Each of these pta can be rendered onto a pix with random colors,
* by using pixRenderRandomCmapPtaa() with closeflag = 1.
*/
PTAA *
generatePtaaBoxa(BOXA *boxa)
{
l_int32 i, n, x, y, w, h;
BOX *box;
PTA *pta;
PTAA *ptaa;
PROCNAME("generatePtaaBoxa");
if (!boxa)
return (PTAA *)ERROR_PTR("boxa not defined", procName, NULL);
n = boxaGetCount(boxa);
ptaa = ptaaCreate(n);
for (i = 0; i < n; i++) {
box = boxaGetBox(boxa, i, L_CLONE);
boxGetGeometry(box, &x, &y, &w, &h);
pta = ptaCreate(4);
ptaAddPt(pta, x, y);
ptaAddPt(pta, x + w - 1, y);
ptaAddPt(pta, x + w - 1, y + h - 1);
ptaAddPt(pta, x, y + h - 1);
ptaaAddPta(ptaa, pta, L_INSERT);
boxDestroy(&box);
}
return ptaa;
}
/*!
* generatePtaaHashBoxa()
*
* Input: boxa
* spacing (spacing between hash lines; must be > 1)
* width (hash line width)
* orient (orientation of lines: L_HORIZONTAL_LINE, ...)
* outline (0 to skip drawing box outline)
* Return: ptaa, or null on error
*
* Notes:
* (1) The orientation takes on one of 4 orientations (horiz, vertical,
* slope +1, slope -1).
* (2) The full outline is also drawn if @outline = 1.
* (3) Each of these pta can be rendered onto a pix with random colors,
* by using pixRenderRandomCmapPtaa() with closeflag = 1.
*
*/
PTAA *
generatePtaaHashBoxa(BOXA *boxa,
l_int32 spacing,
l_int32 width,
l_int32 orient,
l_int32 outline)
{
l_int32 i, n;
BOX *box;
PTA *pta;
PTAA *ptaa;
PROCNAME("generatePtaaHashBoxa");
if (!boxa)
return (PTAA *)ERROR_PTR("boxa not defined", procName, NULL);
if (spacing <= 1)
return (PTAA *)ERROR_PTR("spacing not > 1", procName, NULL);
if (orient != L_HORIZONTAL_LINE && orient != L_POS_SLOPE_LINE &&
orient != L_VERTICAL_LINE && orient != L_NEG_SLOPE_LINE)
return (PTAA *)ERROR_PTR("invalid line orientation", procName, NULL);
n = boxaGetCount(boxa);
ptaa = ptaaCreate(n);
for (i = 0; i < n; i++) {
box = boxaGetBox(boxa, i, L_CLONE);
pta = generatePtaHashBox(box, spacing, width, orient, outline);
ptaaAddPta(ptaa, pta, L_INSERT);
boxDestroy(&box);
}
return ptaa;
}
/*!
* generatePtaPolyline()
*
* Input: pta (vertices of polyline)
* width
* closeflag (1 to close the contour; 0 otherwise)
* removedups (1 to remove, 0 to leave)
* Return: ptad, or null on error
*
* Notes:
* (1) If the boxa has overlapping boxes, and if blending will
* be used to give a transparent effect, transparency
* artifacts at line intersections can be removed using
* removedups = 1.
*/
PTA *
generatePtaPolyline(PTA *ptas,
l_int32 width,
l_int32 closeflag,
l_int32 removedups)
{
l_int32 i, n, x1, y1, x2, y2;
PTA *ptad, *ptat, *pta;
PROCNAME("generatePtaPolyline");
if (!ptas)
return (PTA *)ERROR_PTR("ptas not defined", procName, NULL);
n = ptaGetCount(ptas);
ptat = ptaCreate(0);
if (n < 2) /* nothing to do */
return ptat;
ptaGetIPt(ptas, 0, &x1, &y1);
for (i = 1; i < n; i++) {
ptaGetIPt(ptas, i, &x2, &y2);
pta = generatePtaWideLine(x1, y1, x2, y2, width);
ptaJoin(ptat, pta, 0, 0);
ptaDestroy(&pta);
x1 = x2;
y1 = y2;
}
if (closeflag) {
ptaGetIPt(ptas, 0, &x2, &y2);
pta = generatePtaWideLine(x1, y1, x2, y2, width);
ptaJoin(ptat, pta, 0, 0);
ptaDestroy(&pta);
}
if (removedups)
ptad = ptaRemoveDuplicates(ptat, 0);
else
ptad = ptaClone(ptat);
ptaDestroy(&ptat);
return ptad;
}
/*!
* generatePtaFilledCircle()
*
* Input: radius
* Return: pta, or null on error
*
* Notes:
* (1) The circle is has diameter = 2 * radius + 1.
* (2) It is located with the center of the circle at the
* point (radius, radius).
* (3) Consequently, it typically must be translated if
* it is to represent a set of pixels in an image.
*/
PTA *
generatePtaFilledCircle(l_int32 radius)
{
l_int32 x, y;
l_float32 radthresh, sqdist;
PTA *pta;
PROCNAME("generatePtaFilledCircle");
if (radius < 1)
return (PTA *)ERROR_PTR("radius must be >= 1", procName, NULL);
pta = ptaCreate(0);
radthresh = (radius + 0.5) * (radius + 0.5);
for (y = 0; y <= 2 * radius; y++) {
for (x = 0; x <= 2 * radius; x++) {
sqdist = (l_float32)((y - radius) * (y - radius) +
(x - radius) * (x - radius));
if (sqdist <= radthresh)
ptaAddPt(pta, x, y);
}
}
return pta;
}
/*!
* generatePtaLineFromPt()
*
* Input: x, y (point of origination)
* length (of line, including starting point)
* radang (angle in radians, CW from horizontal)
* Return: pta, or null on error
*
* Notes:
* (1) The @length of the line is 1 greater than the distance
* used in locatePtRadially(). Example: a distance of 1
* gives rise to a length of 2.
*/
PTA *
generatePtaLineFromPt(l_int32 x,
l_int32 y,
l_float64 length,
l_float64 radang)
{
l_int32 x2, y2; /* the point at the other end of the line */
x2 = x + (l_int32)((length - 1.0) * cos(radang));
y2 = y + (l_int32)((length - 1.0) * sin(radang));
return generatePtaLine(x, y, x2, y2);
}
/*!
* locatePtRadially()
*
* Input: xr, yr (reference point)
* radang (angle in radians, CW from horizontal)
* dist (distance of point from reference point along line
* given by the specified angle)
* &x, &y (<return> location of point)
* Return: 0 if OK, 1 on error
*/
l_int32
locatePtRadially(l_int32 xr,
l_int32 yr,
l_float64 dist,
l_float64 radang,
l_float64 *px,
l_float64 *py)
{
PROCNAME("locatePtRadially");
if (!px || !py)
return ERROR_INT("&x and &y not both defined", procName, 1);
*px = xr + dist * cos(radang);
*py = yr + dist * sin(radang);
return 0;
}
/*------------------------------------------------------------------*
* Pta generation for arbitrary shapes built with lines *
*------------------------------------------------------------------*/
/*!
* pixRenderPta()
*
* Input: pix
* pta (arbitrary set of points)
* op (one of L_SET_PIXELS, L_CLEAR_PIXELS, L_FLIP_PIXELS)
* Return: 0 if OK, 1 on error
*
* Notes:
* (1) L_SET_PIXELS puts all image bits in each pixel to 1
* (black for 1 bpp; white for depth > 1)
* (2) L_CLEAR_PIXELS puts all image bits in each pixel to 0
* (white for 1 bpp; black for depth > 1)
* (3) L_FLIP_PIXELS reverses all image bits in each pixel
* (4) This function clips the rendering to the pix. It performs
* clipping for functions such as pixRenderLine(),
* pixRenderBox() and pixRenderBoxa(), that call pixRenderPta().
*/
l_int32
pixRenderPta(PIX *pix,
PTA *pta,
l_int32 op)
{
l_int32 i, n, x, y, w, h, d, maxval;
PROCNAME("pixRenderPta");
if (!pix)
return ERROR_INT("pix not defined", procName, 1);
if (!pta)
return ERROR_INT("pta not defined", procName, 1);
if (op != L_SET_PIXELS && op != L_CLEAR_PIXELS && op != L_FLIP_PIXELS)
return ERROR_INT("invalid op", procName, 1);
pixGetDimensions(pix, &w, &h, &d);
maxval = 1;
if (op == L_SET_PIXELS) {
switch (d)
{
case 2:
maxval = 0x3;
break;
case 4:
maxval = 0xf;
break;
case 8:
maxval = 0xff;
break;
case 16:
maxval = 0xffff;
break;
case 32:
maxval = 0xffffffff;
break;
}
}
n = ptaGetCount(pta);
for (i = 0; i < n; i++) {
ptaGetIPt(pta, i, &x, &y);
if (x < 0 || x >= w)
continue;
if (y < 0 || y >= h)
continue;
switch (op)
{
case L_SET_PIXELS:
pixSetPixel(pix, x, y, maxval);
break;
case L_CLEAR_PIXELS:
pixClearPixel(pix, x, y);
break;
case L_FLIP_PIXELS:
pixFlipPixel(pix, x, y);
break;
default:
break;
}
}
return 0;
}
/*!
* pixRenderPtaArb()
*
* Input: pix
* pta (arbitrary set of points)
* rval, gval, bval
* Return: 0 if OK, 1 on error
*
* Notes:
* (1) If pix is colormapped, render this color on each pixel.
* (2) If pix is not colormapped, do the best job you can using
* the input colors:
* - d = 1: set the pixels
* - d = 2, 4, 8: average the input rgb value
* - d = 32: use the input rgb value
* (3) This function clips the rendering to the pix.
*/
l_int32
pixRenderPtaArb(PIX *pix,
PTA *pta,
l_uint8 rval,
l_uint8 gval,
l_uint8 bval)
{
l_int32 i, n, x, y, w, h, d, index;
l_uint8 val;
l_uint32 val32;
PIXCMAP *cmap;
PROCNAME("pixRenderPtaArb");
if (!pix)
return ERROR_INT("pix not defined", procName, 1);
if (!pta)
return ERROR_INT("pta not defined", procName, 1);
d = pixGetDepth(pix);
if (d != 1 && d != 2 && d != 4 && d != 8 && d != 32)
return ERROR_INT("depth not in {1,2,4,8,32}", procName, 1);
if (d == 1) {
pixRenderPta(pix, pta, L_SET_PIXELS);
return 0;
}
cmap = pixGetColormap(pix);
pixGetDimensions(pix, &w, &h, &d);
if (cmap) {
if (pixcmapAddNewColor(cmap, rval, gval, bval, &index))
return ERROR_INT("colormap is full", procName, 1);
}
else {
if (d == 2)
val = (rval + gval + bval) / (3 * 64);
else if (d == 4)
val = (rval + gval + bval) / (3 * 16);
else if (d == 8)
val = (rval + gval + bval) / 3;
else /* d == 32 */
composeRGBPixel(rval, gval, bval, &val32);
}
n = ptaGetCount(pta);
for (i = 0; i < n; i++) {
ptaGetIPt(pta, i, &x, &y);
if (x < 0 || x >= w)
continue;
if (y < 0 || y >= h)
continue;
if (cmap)
pixSetPixel(pix, x, y, index);
else if (d == 32)
pixSetPixel(pix, x, y, val32);
else
pixSetPixel(pix, x, y, val);
}
return 0;
}
/*!
* pixRenderPtaBlend()
*
* Input: pix (32 bpp rgb)
* pta (arbitrary set of points)
* rval, gval, bval
* Return: 0 if OK, 1 on error
*
* Notes:
* (1) This function clips the rendering to the pix.
*/
l_int32
pixRenderPtaBlend(PIX *pix,
PTA *pta,
l_uint8 rval,
l_uint8 gval,
l_uint8 bval,
l_float32 fract)
{
l_int32 i, n, x, y, w, h;
l_uint8 nrval, ngval, nbval;
l_uint32 val32;
l_float32 frval, fgval, fbval;
PROCNAME("pixRenderPtaBlend");
if (!pix)
return ERROR_INT("pix not defined", procName, 1);
if (!pta)
return ERROR_INT("pta not defined", procName, 1);
if (pixGetDepth(pix) != 32)
return ERROR_INT("depth not 32 bpp", procName, 1);
if (fract < 0.0 || fract > 1.0) {
L_WARNING("fract must be in [0.0, 1.0]; setting to 0.5", procName);
fract = 0.5;
}
pixGetDimensions(pix, &w, &h, NULL);
n = ptaGetCount(pta);
frval = fract * rval;
fgval = fract * gval;
fbval = fract * bval;
for (i = 0; i < n; i++) {
ptaGetIPt(pta, i, &x, &y);
if (x < 0 || x >= w)
continue;
if (y < 0 || y >= h)
continue;
pixGetPixel(pix, x, y, &val32);
nrval = GET_DATA_BYTE(&val32, COLOR_RED);
nrval = (l_uint8)((1. - fract) * nrval + frval);
ngval = GET_DATA_BYTE(&val32, COLOR_GREEN);
ngval = (l_uint8)((1. - fract) * ngval + fgval);
nbval = GET_DATA_BYTE(&val32, COLOR_BLUE);
nbval = (l_uint8)((1. - fract) * nbval + fbval);
composeRGBPixel(nrval, ngval, nbval, &val32);
pixSetPixel(pix, x, y, val32);
}
return 0;
}
/*------------------------------------------------------------------*
* Rendering of arbitrary shapes built with lines *
*------------------------------------------------------------------*/
/*!
* pixRenderLine()
*
* Input: pix
* x1, y1
* x2, y2
* width (thickness of line)
* op (one of L_SET_PIXELS, L_CLEAR_PIXELS, L_FLIP_PIXELS)
* Return: 0 if OK, 1 on error
*/
l_int32
pixRenderLine(PIX *pix,
l_int32 x1,
l_int32 y1,
l_int32 x2,
l_int32 y2,
l_int32 width,
l_int32 op)
{
PTA *pta;
PROCNAME("pixRenderLine");
if (!pix)
return ERROR_INT("pix not defined", procName, 1);
if (width < 1) {
L_WARNING("width must be > 0; setting to 1", procName);
width = 1;
}
if (op != L_SET_PIXELS && op != L_CLEAR_PIXELS && op != L_FLIP_PIXELS)
return ERROR_INT("invalid op", procName, 1);
if ((pta = generatePtaWideLine(x1, y1, x2, y2, width)) == NULL)
return ERROR_INT("pta not made", procName, 1);
pixRenderPta(pix, pta, op);
ptaDestroy(&pta);
return 0;
}
/*!
* pixRenderLineArb()
*
* Input: pix
* x1, y1
* x2, y2
* width (thickness of line)
* rval, gval, bval
* Return: 0 if OK, 1 on error
*/
l_int32
pixRenderLineArb(PIX *pix,
l_int32 x1,
l_int32 y1,
l_int32 x2,
l_int32 y2,
l_int32 width,
l_uint8 rval,
l_uint8 gval,
l_uint8 bval)
{
PTA *pta;
PROCNAME("pixRenderLineArb");
if (!pix)
return ERROR_INT("pix not defined", procName, 1);
if (width < 1) {
L_WARNING("width must be > 0; setting to 1", procName);
width = 1;
}
if ((pta = generatePtaWideLine(x1, y1, x2, y2, width)) == NULL)
return ERROR_INT("pta not made", procName, 1);
pixRenderPtaArb(pix, pta, rval, gval, bval);
ptaDestroy(&pta);
return 0;
}
/*!
* pixRenderLineBlend()
*
* Input: pix
* x1, y1
* x2, y2
* width (thickness of line)
* rval, gval, bval
* fract
* Return: 0 if OK, 1 on error
*/
l_int32
pixRenderLineBlend(PIX *pix,
l_int32 x1,
l_int32 y1,
l_int32 x2,
l_int32 y2,
l_int32 width,
l_uint8 rval,
l_uint8 gval,
l_uint8 bval,
l_float32 fract)
{
PTA *pta;
PROCNAME("pixRenderLineBlend");
if (!pix)
return ERROR_INT("pix not defined", procName, 1);
if (width < 1) {
L_WARNING("width must be > 0; setting to 1", procName);
width = 1;
}
if ((pta = generatePtaWideLine(x1, y1, x2, y2, width)) == NULL)
return ERROR_INT("pta not made", procName, 1);
pixRenderPtaBlend(pix, pta, rval, gval, bval, fract);
ptaDestroy(&pta);
return 0;
}
/*!
* pixRenderBox()
*
* Input: pix
* box
* width (thickness of box lines)
* op (one of L_SET_PIXELS, L_CLEAR_PIXELS, L_FLIP_PIXELS)
* Return: 0 if OK, 1 on error
*/
l_int32
pixRenderBox(PIX *pix,
BOX *box,
l_int32 width,
l_int32 op)
{
PTA *pta;
PROCNAME("pixRenderBox");
if (!pix)
return ERROR_INT("pix not defined", procName, 1);
if (!box)
return ERROR_INT("box not defined", procName, 1);
if (op != L_SET_PIXELS && op != L_CLEAR_PIXELS && op != L_FLIP_PIXELS)
return ERROR_INT("invalid op", procName, 1);
if ((pta = generatePtaBox(box, width)) == NULL)
return ERROR_INT("pta not made", procName, 1);
pixRenderPta(pix, pta, op);
ptaDestroy(&pta);
return 0;
}
/*!
* pixRenderBoxArb()
*
* Input: pix
* box
* width (thickness of box lines)
* rval, gval, bval
* Return: 0 if OK, 1 on error
*/
l_int32
pixRenderBoxArb(PIX *pix,
BOX *box,
l_int32 width,
l_uint8 rval,
l_uint8 gval,
l_uint8 bval)
{
PTA *pta;
PROCNAME("pixRenderBoxArb");
if (!pix)
return ERROR_INT("pix not defined", procName, 1);
if (!box)
return ERROR_INT("box not defined", procName, 1);
if ((pta = generatePtaBox(box, width)) == NULL)
return ERROR_INT("pta not made", procName, 1);
pixRenderPtaArb(pix, pta, rval, gval, bval);
ptaDestroy(&pta);
return 0;
}
/*!
* pixRenderBoxBlend()
*
* Input: pix
* box
* width (thickness of box lines)
* rval, gval, bval
* fract (in [0.0 - 1.0]; complete transparency (no effect)
* if 0.0; no transparency if 1.0)
* Return: 0 if OK, 1 on error
*/
l_int32
pixRenderBoxBlend(PIX *pix,
BOX *box,
l_int32 width,
l_uint8 rval,
l_uint8 gval,
l_uint8 bval,
l_float32 fract)
{
PTA *pta;
PROCNAME("pixRenderBoxBlend");
if (!pix)
return ERROR_INT("pix not defined", procName, 1);
if (!box)
return ERROR_INT("box not defined", procName, 1);
if ((pta = generatePtaBox(box, width)) == NULL)
return ERROR_INT("pta not made", procName, 1);
pixRenderPtaBlend(pix, pta, rval, gval, bval, fract);
ptaDestroy(&pta);
return 0;
}
/*!
* pixRenderHashBox()
*
* Input: pix
* box
* spacing (spacing between lines; must be > 1)
* width (thickness of box and hash lines)
* orient (orientation of lines: L_HORIZONTAL_LINE, ...)
* outline (0 to skip drawing box outline)
* op (one of L_SET_PIXELS, L_CLEAR_PIXELS, L_FLIP_PIXELS)
* Return: 0 if OK, 1 on error
*/
l_int32
pixRenderHashBox(PIX *pix,
BOX *box,
l_int32 spacing,
l_int32 width,
l_int32 orient,
l_int32 outline,
l_int32 op)
{
PTA *pta;
PROCNAME("pixRenderHashBox");
if (!pix)
return ERROR_INT("pix not defined", procName, 1);
if (!box)
return ERROR_INT("box not defined", procName, 1);
if (spacing <= 1)
return ERROR_INT("spacing not > 1", procName, 1);
if (orient != L_HORIZONTAL_LINE && orient != L_POS_SLOPE_LINE &&
orient != L_VERTICAL_LINE && orient != L_NEG_SLOPE_LINE)
return ERROR_INT("invalid line orientation", procName, 1);
if (op != L_SET_PIXELS && op != L_CLEAR_PIXELS && op != L_FLIP_PIXELS)
return ERROR_INT("invalid op", procName, 1);
pta = generatePtaHashBox(box, spacing, width, orient, outline);
if (!pta)
return ERROR_INT("pta not made", procName, 1);
pixRenderPta(pix, pta, op);
ptaDestroy(&pta);
return 0;
}
/*!
* pixRenderBoxArb()
*
* Input: pix
* box
* spacing (spacing between lines; must be > 1)
* width (thickness of box and hash lines)
* orient (orientation of lines: L_HORIZONTAL_LINE, ...)
* outline (0 to skip drawing box outline)
* rval, gval, bval
* Return: 0 if OK, 1 on error
*/
l_int32
pixRenderHashBoxArb(PIX *pix,
BOX *box,
l_int32 spacing,
l_int32 width,
l_int32 orient,
l_int32 outline,
l_int32 rval,
l_int32 gval,
l_int32 bval)
{
PTA *pta;
PROCNAME("pixRenderHashBoxArb");
if (!pix)
return ERROR_INT("pix not defined", procName, 1);
if (!box)
return ERROR_INT("box not defined", procName, 1);
if (spacing <= 1)
return ERROR_INT("spacing not > 1", procName, 1);
if (orient != L_HORIZONTAL_LINE && orient != L_POS_SLOPE_LINE &&
orient != L_VERTICAL_LINE && orient != L_NEG_SLOPE_LINE)
return ERROR_INT("invalid line orientation", procName, 1);
pta = generatePtaHashBox(box, spacing, width, orient, outline);
if (!pta)
return ERROR_INT("pta not made", procName, 1);
pixRenderPtaArb(pix, pta, rval, gval, bval);
ptaDestroy(&pta);
return 0;
}
/*!
* pixRenderHashBoxBlend()
*
* Input: pix
* box
* spacing (spacing between lines; must be > 1)
* width (thickness of box and hash lines)
* orient (orientation of lines: L_HORIZONTAL_LINE, ...)
* outline (0 to skip drawing box outline)
* rval, gval, bval
* fract (in [0.0 - 1.0]; complete transparency (no effect)
* if 0.0; no transparency if 1.0)
* Return: 0 if OK, 1 on error
*/
l_int32
pixRenderHashBoxBlend(PIX *pix,
BOX *box,
l_int32 spacing,
l_int32 width,
l_int32 orient,
l_int32 outline,
l_int32 rval,
l_int32 gval,
l_int32 bval,
l_float32 fract)
{
PTA *pta;
PROCNAME("pixRenderHashBoxBlend");
if (!pix)
return ERROR_INT("pix not defined", procName, 1);
if (!box)
return ERROR_INT("box not defined", procName, 1);
if (spacing <= 1)
return ERROR_INT("spacing not > 1", procName, 1);
if (orient != L_HORIZONTAL_LINE && orient != L_POS_SLOPE_LINE &&
orient != L_VERTICAL_LINE && orient != L_NEG_SLOPE_LINE)
return ERROR_INT("invalid line orientation", procName, 1);
pta = generatePtaHashBox(box, spacing, width, orient, outline);
if (!pta)
return ERROR_INT("pta not made", procName, 1);
pixRenderPtaBlend(pix, pta, rval, gval, bval, fract);
ptaDestroy(&pta);
return 0;
}
/*!
* pixRenderBoxa()
*
* Input: pix
* boxa
* width (thickness of line)
* op (one of L_SET_PIXELS, L_CLEAR_PIXELS, L_FLIP_PIXELS)
* Return: 0 if OK, 1 on error
*/
l_int32
pixRenderBoxa(PIX *pix,
BOXA *boxa,
l_int32 width,
l_int32 op)
{
PTA *pta;
PROCNAME("pixRenderBoxa");
if (!pix)
return ERROR_INT("pix not defined", procName, 1);
if (!boxa)
return ERROR_INT("boxa not defined", procName, 1);
if (op != L_SET_PIXELS && op != L_CLEAR_PIXELS && op != L_FLIP_PIXELS)
return ERROR_INT("invalid op", procName, 1);
if ((pta = generatePtaBoxa(boxa, width, 0)) == NULL)
return ERROR_INT("pta not made", procName, 1);
pixRenderPta(pix, pta, op);
ptaDestroy(&pta);
return 0;
}
/*!
* pixRenderBoxaArb()
*
* Input: pix
* boxa
* width (thickness of line)
* rval, gval, bval
* Return: 0 if OK, 1 on error
*/
l_int32
pixRenderBoxaArb(PIX *pix,
BOXA *boxa,
l_int32 width,
l_uint8 rval,
l_uint8 gval,
l_uint8 bval)
{
PTA *pta;
PROCNAME("pixRenderBoxaArb");
if (!pix)
return ERROR_INT("pix not defined", procName, 1);
if (!boxa)
return ERROR_INT("boxa not defined", procName, 1);
if ((pta = generatePtaBoxa(boxa, width, 0)) == NULL)
return ERROR_INT("pta not made", procName, 1);
pixRenderPtaArb(pix, pta, rval, gval, bval);
ptaDestroy(&pta);
return 0;
}
/*!
* pixRenderBoxaBlend()
*
* Input: pix
* boxa
* width (thickness of line)
* rval, gval, bval
* fract (in [0.0 - 1.0]; complete transparency (no effect)
* if 0.0; no transparency if 1.0)
* removedups (1 to remove; 0 otherwise)
* Return: 0 if OK, 1 on error
*/
l_int32
pixRenderBoxaBlend(PIX *pix,
BOXA *boxa,
l_int32 width,
l_uint8 rval,
l_uint8 gval,
l_uint8 bval,
l_float32 fract,
l_int32 removedups)
{
PTA *pta;
PROCNAME("pixRenderBoxaBlend");
if (!pix)
return ERROR_INT("pix not defined", procName, 1);
if (!boxa)
return ERROR_INT("boxa not defined", procName, 1);
if ((pta = generatePtaBoxa(boxa, width, removedups)) == NULL)
return ERROR_INT("pta not made", procName, 1);
pixRenderPtaBlend(pix, pta, rval, gval, bval, fract);
ptaDestroy(&pta);
return 0;
}
/*!
* pixRenderPolyline()
*
* Input: pix
* ptas
* width (thickness of line)
* op (one of L_SET_PIXELS, L_CLEAR_PIXELS, L_FLIP_PIXELS)
* closeflag (1 to close the contour; 0 otherwise)
* Return: 0 if OK, 1 on error
*
* Note: this renders a closed contour.
*/
l_int32
pixRenderPolyline(PIX *pix,
PTA *ptas,
l_int32 width,
l_int32 op,
l_int32 closeflag)
{
PTA *pta;
PROCNAME("pixRenderPolyline");
if (!pix)
return ERROR_INT("pix not defined", procName, 1);
if (!ptas)
return ERROR_INT("ptas not defined", procName, 1);
if (op != L_SET_PIXELS && op != L_CLEAR_PIXELS && op != L_FLIP_PIXELS)
return ERROR_INT("invalid op", procName, 1);
if ((pta = generatePtaPolyline(ptas, width, closeflag, 0)) == NULL)
return ERROR_INT("pta not made", procName, 1);
pixRenderPta(pix, pta, op);
ptaDestroy(&pta);
return 0;
}
/*!
* pixRenderPolylineArb()
*
* Input: pix
* ptas
* width (thickness of line)
* rval, gval, bval
* closeflag (1 to close the contour; 0 otherwise)
* Return: 0 if OK, 1 on error
*
* Note: this renders a closed contour.
*/
l_int32
pixRenderPolylineArb(PIX *pix,
PTA *ptas,
l_int32 width,
l_uint8 rval,
l_uint8 gval,
l_uint8 bval,
l_int32 closeflag)
{
PTA *pta;
PROCNAME("pixRenderPolylineArb");
if (!pix)
return ERROR_INT("pix not defined", procName, 1);
if (!ptas)
return ERROR_INT("ptas not defined", procName, 1);
if ((pta = generatePtaPolyline(ptas, width, closeflag, 0)) == NULL)
return ERROR_INT("pta not made", procName, 1);
pixRenderPtaArb(pix, pta, rval, gval, bval);
ptaDestroy(&pta);
return 0;
}
/*!
* pixRenderPolylineBlend()
*
* Input: pix
* ptas
* width (thickness of line)
* rval, gval, bval
* fract (in [0.0 - 1.0]; complete transparency (no effect)
* if 0.0; no transparency if 1.0)
* closeflag (1 to close the contour; 0 otherwise)
* removedups (1 to remove; 0 otherwise)
* Return: 0 if OK, 1 on error
*/
l_int32
pixRenderPolylineBlend(PIX *pix,
PTA *ptas,
l_int32 width,
l_uint8 rval,
l_uint8 gval,
l_uint8 bval,
l_float32 fract,
l_int32 closeflag,
l_int32 removedups)
{
PTA *pta;
PROCNAME("pixRenderPolylineBlend");
if (!pix)
return ERROR_INT("pix not defined", procName, 1);
if (!ptas)
return ERROR_INT("ptas not defined", procName, 1);
if ((pta = generatePtaPolyline(ptas, width, closeflag, removedups)) == NULL)
return ERROR_INT("pta not made", procName, 1);
pixRenderPtaBlend(pix, pta, rval, gval, bval, fract);
ptaDestroy(&pta);
return 0;
}
/*!
* pixRenderRandomCmapPtaa()
*
* Input: pix (1, 2, 4, 8, 16, 32 bpp)
* ptaa
* polyflag (1 to interpret each Pta as a polyline; 0 to simply
* render the Pta as a set of pixels)
* width (thickness of line; use only for polyline)
* closeflag (1 to close the contour; 0 otherwise;
* use only for polyline mode)
* Return: pixd (cmapped, 8 bpp) or null on error
*
* Notes:
* (1) This is a debugging routine, that displays a set of
* pixels, selected by the set of Ptas in a Ptaa,
* in a random color in a pix.
* (2) If @polyflag == 1, each Pta is considered to be a polyline,
* and is rendered using @width and @closeflag. Each polyline
* is rendered in a random color.
* (3) If @polyflag == 0, all points in each Pta are rendered in a
* random color. The @width and @closeflag parameters are ignored.
* (4) The output pix is 8 bpp and colormapped. Up to 254
* different, randomly selected colors, can be used.
* (5) The rendered pixels replace the input pixels. They will
* be clipped silently to the input pix.
*/
PIX *
pixRenderRandomCmapPtaa(PIX *pix,
PTAA *ptaa,
l_int32 polyflag,
l_int32 width,
l_int32 closeflag)
{
l_int32 i, n, index, rval, gval, bval;
PIXCMAP *cmap;
PTA *pta, *ptat;
PIX *pixd;
PROCNAME("pixRenderRandomCmapPtaa");
if (!pix)
return (PIX *)ERROR_PTR("pix not defined", procName, NULL);
if (!ptaa)
return (PIX *)ERROR_PTR("ptaa not defined", procName, NULL);
pixd = pixConvertTo8(pix, FALSE);
cmap = pixcmapCreateRandom(8, 1, 1);
pixSetColormap(pixd, cmap);
if ((n = ptaaGetCount(ptaa)) == 0)
return pixd;
for (i = 0; i < n; i++) {
index = 1 + (i % 254);
pixcmapGetColor(cmap, index, &rval, &gval, &bval);
pta = ptaaGetPta(ptaa, i, L_CLONE);
if (polyflag)
ptat = generatePtaPolyline(pta, width, closeflag, 0);
else
ptat = ptaClone(pta);
pixRenderPtaArb(pixd, ptat, rval, gval, bval);
ptaDestroy(&pta);
ptaDestroy(&ptat);
}
return pixd;
}
/*------------------------------------------------------------------*
* Contour rendering on grayscale images *
*------------------------------------------------------------------*/
/*!
* pixRenderContours()
*
* Input: pixs (8 or 16 bpp; no colormap)
* startval (value of lowest contour; must be in [0 ... maxval])
* incr (increment to next contour; must be > 0)
* outdepth (either 1 or depth of pixs)
* Return: pixd, or null on error
*
* Notes:
* (1) The output can be either 1 bpp, showing just the contour
* lines, or a copy of the input pixs with the contour lines
* superposed.
*/
PIX *
pixRenderContours(PIX *pixs,
l_int32 startval,
l_int32 incr,
l_int32 outdepth)
{
l_int32 w, h, d, maxval, wpls, wpld, i, j, val, test;
l_uint32 *datas, *datad, *lines, *lined;
PIX *pixd;
PROCNAME("pixRenderContours");
if (!pixs)
return (PIX *)ERROR_PTR("pixs not defined", procName, NULL);
if (pixGetColormap(pixs))
return (PIX *)ERROR_PTR("pixs has colormap", procName, NULL);
pixGetDimensions(pixs, &w, &h, &d);
if (d != 8 && d != 16)
return (PIX *)ERROR_PTR("pixs not 8 or 16 bpp", procName, NULL);
if (outdepth != 1 && outdepth != d) {
L_WARNING("invalid outdepth; setting to 1", procName);
outdepth = 1;
}
maxval = (1 << d) - 1;
if (startval < 0 || startval > maxval)
return (PIX *)ERROR_PTR("startval not in [0 ... maxval]",
procName, NULL);
if (incr < 1)
return (PIX *)ERROR_PTR("incr < 1", procName, NULL);
if (outdepth == d)
pixd = pixCopy(NULL, pixs);
else
pixd = pixCreate(w, h, 1);
pixCopyResolution(pixd, pixs);
datad = pixGetData(pixd);
wpld = pixGetWpl(pixd);
datas = pixGetData(pixs);
wpls = pixGetWpl(pixs);
switch (d)
{
case 8:
if (outdepth == 1) {
for (i = 0; i < h; i++) {
lines = datas + i * wpls;
lined = datad + i * wpld;
for (j = 0; j < w; j++) {
val = GET_DATA_BYTE(lines, j);
if (val < startval)
continue;
test = (val - startval) % incr;
if (!test)
SET_DATA_BIT(lined, j);
}
}
}
else { /* outdepth == d */
for (i = 0; i < h; i++) {
lines = datas + i * wpls;
lined = datad + i * wpld;
for (j = 0; j < w; j++) {
val = GET_DATA_BYTE(lines, j);
if (val < startval)
continue;
test = (val - startval) % incr;
if (!test)
SET_DATA_BYTE(lined, j, 0);
}
}
}
break;
case 16:
if (outdepth == 1) {
for (i = 0; i < h; i++) {
lines = datas + i * wpls;
lined = datad + i * wpld;
for (j = 0; j < w; j++) {
val = GET_DATA_TWO_BYTES(lines, j);
if (val < startval)
continue;
test = (val - startval) % incr;
if (!test)
SET_DATA_BIT(lined, j);
}
}
}
else { /* outdepth == d */
for (i = 0; i < h; i++) {
lines = datas + i * wpls;
lined = datad + i * wpld;
for (j = 0; j < w; j++) {
val = GET_DATA_TWO_BYTES(lines, j);
if (val < startval)
continue;
test = (val - startval) % incr;
if (!test)
SET_DATA_TWO_BYTES(lined, j, 0);
}
}
}
break;
default:
return (PIX *)ERROR_PTR("pixs not 8 or 16 bpp", procName, NULL);
}
return pixd;
}
/*!
* fpixRenderContours()
*
* Input: fpixs
* startval (value of lowest contour
* incr (increment to next contour; must be > 0.0)
* proxim (required proximity to target value; typ. 0.1 * incr)
* Return: pixd (1 bpp), or null on error
*/
PIX *
fpixRenderContours(FPIX *fpixs,
l_float32 startval,
l_float32 incr,
l_float32 proxim)
{
l_int32 i, j, w, h, wpls, wpld;
l_float32 val, invincr, finter, diff;
l_uint32 *datad, *lined;
l_float32 *datas, *lines;
PIX *pixd;
PROCNAME("fpixRenderContours");
if (!fpixs)
return (PIX *)ERROR_PTR("fpixs not defined", procName, NULL);
if (incr <= 0.0)
return (PIX *)ERROR_PTR("incr <= 0.0", procName, NULL);
fpixGetDimensions(fpixs, &w, &h);
if ((pixd = pixCreate(w, h, 1)) == NULL)
return (PIX *)ERROR_PTR("pixd not made", procName, NULL);
datas = fpixGetData(fpixs);
wpls = fpixGetWpl(fpixs);
datad = pixGetData(pixd);
wpld = pixGetWpl(pixd);
invincr = 1.0 / incr;
for (i = 0; i < h; i++) {
lines = datas + i * wpls;
lined = datad + i * wpld;
for (j = 0; j < w; j++) {
val = lines[j];
if (val < startval)
continue;
finter = L_ABS(invincr * (val - startval));
diff = finter - floorf(finter);
if (diff <= proxim)
SET_DATA_BIT(lined, j);
}
}
return pixd;
}
......@@ -6,7 +6,7 @@
#include "../BgraFrame.h"
#include <string>
namespace Jpeg2000
namespace Jpeg2000
{
class CJ2kFile
......@@ -75,7 +75,7 @@ namespace Jpeg2000
pParameters->nSubSamplingDx = 1;
pParameters->nSubSamplingDy = 1;
pParameters->bTileSizeOn = false;
pParameters->sComment = "Manufactured by Online Media Technologies Ltd.";
pParameters->sComment = (char*)"Manufactured by Online Media Technologies Ltd.";
// TODO: Сделать чтение параметров кодирования
//if (sXml.GetLength() > 0)
......
#pragma once
#include "Reader.h"
#include "../../graphics/Defines.h"
#include <algorithm>
namespace Jpeg2000
{
......
#include "MetaFileUtils.h"
#include "MetaFileUtils.h"
#include "../../raster/ImageFileFormatChecker.h"
#include "../../raster/BgraFrame.h"
......@@ -24,7 +24,7 @@ namespace MetaFile
ulBit = ulBit << 1;
unOffset++;
// 32-
// ограничиваемся 32-битами
if (ulBit & 0x80000000)
return 0;
}
......@@ -100,7 +100,7 @@ namespace MetaFile
*pulWidth = 0;
*pulHeight = 0;
if (BI_BITCOUNT_0 == ushBitCount) // PNG, JPEG
if (BI_BITCOUNT_0 == ushBitCount) // Значит компрессия либо PNG, либо JPEG
{
if (BI_JPEG != unCompression || BI_PNG != unCompression)
return false;
......@@ -116,19 +116,19 @@ namespace MetaFile
CBgraFrame oFrame;
oFrame.OpenFile(wsTempFileName);
// TODO: .
// TODO: Как будут файлы сделать чтение.
NSFile::CFileBinary::Remove(wsTempFileName);
return false;
}
else if (BI_BITCOUNT_1 == ushBitCount)
{
// , 2-
// Двуцветная картинка, значит палитра состоит из 2-х цветов
TRgbQuad oColor1, oColor2;
if (oHeaderStream.CanRead() >= 8)
oHeaderStream >> oColor1 >> oColor2;
//
// Считываем саму картинку
int lCalcLen = (((nWidth * ushPlanes * ushBitCount + 31) & ~31) / 8) * abs(nHeight);
if (lCalcLen > lBufLen)
return false;
......@@ -163,7 +163,7 @@ namespace MetaFile
int nAlpha = 255;
if (nX == nWidthBytes - 1)
{
// ,
// Не до конца заполненный байт иногда заполняется странным цветом, поэтому мы делаем его прозрачным
nBitCount = nLastBitCount;
nAlpha = 0;
}
......@@ -197,7 +197,7 @@ namespace MetaFile
int nAlpha = 255;
if (nX == nWidthBytes - 1)
{
// ,
// Не до конца заполненный байт иногда заполняется странным цветом, поэтому мы делаем его прозрачным
nBitCount = nLastBitCount;
//nAlpha = 0;
}
......@@ -236,20 +236,20 @@ namespace MetaFile
if (oHeaderStream.CanRead() < unColorTableLen * 4)
return false;
//
// Считываем палитру
for (unsigned short ushIndex = 0; ushIndex < unColorTableLen; ushIndex++)
{
oHeaderStream >> oColorTable[ushIndex];
}
// 4 - 1
// 4 бита - 1 пиксел
//
// Считываем саму картинку
int lCalcLen = (((nWidth * ushPlanes * ushBitCount + 31) & ~31) / 8) * abs(nHeight);
if (lCalcLen != lBufLen)
return false;
// 4, 8
// Ширина в байтах должна быть кратна 4, значит сама ширина должна быть кратна 8
int nAdd = 0;
while (0 != div_t(div(nWidth + nAdd, 8)).rem)
{
......@@ -353,14 +353,14 @@ namespace MetaFile
if (oHeaderStream.CanRead() < ushColorTableLen * 4)
return false;
//
// Считываем палитру
for (unsigned short ushIndex = 0; ushIndex < ushColorTableLen; ushIndex++)
{
oHeaderStream >> oColorTable[ushIndex];
}
// 1 - 1
// 4.
// 1 байт - 1 пиксел
// Ширина должна быть кратна 4.
int nAdd = 0;
while (0 != div_t(div(nWidth + nAdd, 4)).rem)
{
......@@ -428,7 +428,7 @@ namespace MetaFile
if (BI_RGB == unCompression)
{
// ,
// Маски, сдвиги и коэффициенты уже заполнены стандартными значениями для масок
// 000000000011111 - Red
// 000001111100000 - Green
// 111110000000000 - Blue
......@@ -450,13 +450,13 @@ namespace MetaFile
else
return false;
//
// Считываем саму картинку
int lCalcLen = (((nWidth * ushPlanes * ushBitCount + 31) & ~31) / 8) * abs(nHeight);
if (lCalcLen != lBufLen)
return false;
// 2
// ( * 3) 4.
// 2 байт на все каналы канал
// (Ширина * 3) должна быть кратна 4.
int nAdd = 0;
while (0 != div_t(div(2 * nWidth + nAdd, 4)).rem)
{
......@@ -523,15 +523,15 @@ namespace MetaFile
else if (BI_BITCOUNT_5 == ushBitCount)
{
if (BI_RGB != unCompression)
return false; // TODO: ,
return false; // TODO: Сделать данный вариант, как только будет файлы с данным типом
//
// Считываем саму картинку
int lCalcLen = (((nWidth * ushPlanes * ushBitCount + 31) & ~31) / 8) * abs(nHeight);
if (lCalcLen != lBufLen)
return false;
// 1
// ( * 3) 4.
// 1 байт на каждый канал
// (Ширина * 3) должна быть кратна 4.
int nAdd = 0;
while (0 != div_t(div(3 * nWidth + nAdd, 4)).rem)
{
......@@ -594,7 +594,7 @@ namespace MetaFile
if (BI_RGB == unCompression)
{
// ,
// Маски, сдвиги и коэффициенты уже заполнены стандартными значениями для масок
}
else if (BI_BITFIELDS == unCompression)
{
......@@ -618,13 +618,13 @@ namespace MetaFile
else
return false;
//
// Считываем саму картинку
int lCalcLen = (((nWidth * ushPlanes * ushBitCount + 31) & ~31) / 8) * abs(nHeight);
if (lCalcLen != lBufLen)
return false;
// 1
// 4.
// 1 байт на каждый канал
// Ширина должна быть кратна 4.
int nAdd = 0;
while (0 != div_t(div(nWidth + nAdd, 4)).rem)
{
......@@ -666,7 +666,7 @@ namespace MetaFile
pBgraBuffer[nIndex + 0] = pBuffer[0]; pBuffer++; lBufLen--;
pBgraBuffer[nIndex + 1] = pBuffer[0]; pBuffer++; lBufLen--;
pBgraBuffer[nIndex + 2] = pBuffer[0]; pBuffer++; lBufLen--;
pBgraBuffer[nIndex + 3] = 255; pBuffer++; lBufLen--; // ,
pBgraBuffer[nIndex + 3] = 255; pBuffer++; lBufLen--; // Если брать значение из картинки, тогда она получается всегда прозрачной
}
}
for (int nX = nWidth; nX < nWidth + nAdd; nX++)
......@@ -705,7 +705,7 @@ namespace MetaFile
pBgraBuffer[nIndex + 0] = pBuffer[0]; pBuffer++; lBufLen--;
pBgraBuffer[nIndex + 1] = pBuffer[0]; pBuffer++; lBufLen--;
pBgraBuffer[nIndex + 2] = pBuffer[0]; pBuffer++; lBufLen--;
pBgraBuffer[nIndex + 3] = 255; pBuffer++; lBufLen--; // ,
pBgraBuffer[nIndex + 3] = 255; pBuffer++; lBufLen--; // Если брать значение из картинки, тогда она получается всегда прозрачной
}
}
......@@ -739,7 +739,7 @@ namespace MetaFile
CDataStream oHeaderStream;
oHeaderStream.SetStream(pHeaderBuffer, ulHeaderBufferLen);
//
// Считываем заголовок
unsigned int ulHeaderSize;
oHeaderStream >> ulHeaderSize;
......@@ -758,7 +758,7 @@ namespace MetaFile
CDataStream oHeaderStream;
oHeaderStream.SetStream(pImageBuffer, unBufferLen);
//
// Считываем заголовок
unsigned int unHeaderSize;
oHeaderStream >> unHeaderSize;
......@@ -811,7 +811,7 @@ namespace MetaFile
}
else
{
// TODO:
// TODO: реализовать другие типы цветов
}
}
}
......@@ -820,7 +820,7 @@ namespace MetaFile
double dX0 = (nL + nR) / 2.0;
double dY0 = (nT + nB) / 2.0;
//
// Определим квадрант
int nQuarter = -1;
if (nX >= dX0)
{
......@@ -853,7 +853,7 @@ namespace MetaFile
void ProcessRasterOperation(unsigned int unRasterOperation, BYTE** ppBgra, unsigned int unWidth, unsigned int unHeight)
{
BYTE* pBgra = *ppBgra;
// SRCPAINT SRCAND , .
// Для битовых операций SRCPAINT и SRCAND сделаем, как будто фон чисто белый.
if (0x008800C6 == unRasterOperation) // SRCPAINT
{
BYTE* pCur = pBgra;
......@@ -907,7 +907,7 @@ namespace MetaFile
return sRes;
}
bool OpenTempFile(std::wstring *pwsName, FILE **ppFile, wchar_t *wsMode, wchar_t *wsExt, wchar_t *wsFolder)
bool OpenTempFile(std::wstring *pwsName, FILE **ppFile, const wchar_t *wsMode, const wchar_t *wsExt, const wchar_t *wsFolder)
{
std::wstring wsTemp, wsFileName;
FILE *pTempFile = NULL;
......
#ifndef _METAFILE_COMMON_METAFILEUTILS_H
#ifndef _METAFILE_COMMON_METAFILEUTILS_H
#define _METAFILE_COMMON_METAFILEUTILS_H
#include "MetaFileTypes.h"
......@@ -270,7 +270,7 @@ namespace MetaFile
*this >> oText.iGraphicsMode;
*this >> oText.exScale;
*this >> oText.eyScale;
ReadEmrTextW(oText.wEmrText, 36); // 8 + 28 (8 - , 28 - )
ReadEmrTextW(oText.wEmrText, 36); // 8 + 28 (8 - тип и размер, 28 - размер данной структуры)
return *this;
}
......@@ -280,7 +280,7 @@ namespace MetaFile
*this >> oText.iGraphicsMode;
*this >> oText.exScale;
*this >> oText.eyScale;
ReadEmrTextA(oText.aEmrText, 36); // 8 + 28 (8 - , 28 - )
ReadEmrTextA(oText.aEmrText, 36); // 8 + 28 (8 - тип и размер, 28 - размер данной структуры)
return *this;
}
......@@ -478,7 +478,7 @@ namespace MetaFile
for (unsigned int unIndex = 0; unIndex < oText.cStrings; unIndex++)
{
unsigned int nCurPos = Tell();
ReadEmrTextA(oText.aEmrText[unIndex], nCurPos - nStartPos + 36); // 8 + 28 (8 - , 28 - )
ReadEmrTextA(oText.aEmrText[unIndex], nCurPos - nStartPos + 36); // 8 + 28 (8 - тип и размер, 28 - размер данной структуры)
}
}
else
......@@ -506,7 +506,7 @@ namespace MetaFile
for (unsigned int unIndex = 0; unIndex < oText.cStrings; unIndex++)
{
unsigned int nCurPos = Tell();
ReadEmrTextW(oText.wEmrText[unIndex], nCurPos - nStartPos + 36); // 8 + 28 (8 - , 28 - )
ReadEmrTextW(oText.wEmrText[unIndex], nCurPos - nStartPos + 36); // 8 + 28 (8 - тип и размер, 28 - размер данной структуры)
}
}
else
......@@ -641,7 +641,7 @@ namespace MetaFile
*this >> pFont->Quality;
*this >> pFont->PitchAndFamily;
//
// Читаем до тех пор пока не встретим нулевой символ
unsigned char unIndex = 0;
*this >> pFont->Facename[unIndex];
while (0x00 != pFont->Facename[unIndex])
......@@ -711,7 +711,7 @@ namespace MetaFile
*this >> oScan.Top;
*this >> oScan.Bottom;
if (oScan.Count > 0 && oScan.Count & 1) // 2
if (oScan.Count > 0 && oScan.Count & 1) // Должно делиться на 2
{
unsigned short ushCount = oScan.Count >> 1;
oScan.ScanLines = new TWmfScanLine[ushCount];
......@@ -890,9 +890,9 @@ namespace MetaFile
{
*this >> oText;
// OutputString
// Читаем OutputString
const unsigned int unCharsCount = oText.Chars;
int nSkip = oText.offString - (unOffset + 40); // 40 - TEmfEmrText
int nSkip = oText.offString - (unOffset + 40); // 40 - размер структуры TEmfEmrText
Skip(nSkip);
T* pString = new T[unCharsCount + 1];
if (pString)
......@@ -902,7 +902,7 @@ namespace MetaFile
oText.OutputString = (void*)pString;
}
// OutputDx
// Читаем OutputDx
nSkip = oText.offDx - oText.offString - 2 * unCharsCount;
Skip(nSkip);
const unsigned int unDxCount = oText.Options & ETO_PDY ? 2 * unCharsCount : unCharsCount;
......@@ -933,6 +933,6 @@ namespace MetaFile
void ReadImage(BYTE* pImageBuffer, unsigned int unBufferLen, unsigned int unColorUsage, BYTE** ppDstBuffer, unsigned int* punWidth, unsigned int* punHeight);
double GetEllipseAngle(int nL, int nT, int nR, int nB, int nX, int nY);
void ProcessRasterOperation(unsigned int unRasterOperation, BYTE** ppBgra, unsigned int unWidth, unsigned int unHeight);
bool OpenTempFile(std::wstring *pwsName, FILE **ppFile, wchar_t *wsMode, wchar_t *wsExt, wchar_t *wsFolder);
bool OpenTempFile(std::wstring *pwsName, FILE **ppFile, const wchar_t *wsMode, const wchar_t *wsExt, const wchar_t *wsFolder);
};
#endif // _METAFILE_COMMON_METAFILEUTILS_H
\ No newline at end of file
#endif // _METAFILE_COMMON_METAFILEUTILS_H
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment