contrek 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +4 -3
- data/CHANGELOG.md +21 -0
- data/Gemfile.lock +4 -4
- data/README.md +34 -30
- data/Rakefile +3 -0
- data/contrek.gemspec +7 -4
- data/ext/cpp_polygon_finder/PolygonFinder/Makefile +44 -0
- data/ext/cpp_polygon_finder/PolygonFinder/images/sample_10240x10240.png +0 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/Main.cpp +14 -5
- data/ext/cpp_polygon_finder/PolygonFinder/src/Tests.cpp +136 -15
- data/ext/cpp_polygon_finder/PolygonFinder/src/Tests.h +5 -4
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/CpuTimer.h +44 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/bitmaps/Bitmap.cpp +8 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/bitmaps/Bitmap.h +3 -4
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/bitmaps/FastPngBitmap.cpp +63 -573
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/bitmaps/FastPngBitmap.h +17 -18
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/bitmaps/RemoteFastPngBitmap.cpp +22 -5
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/bitmaps/RemoteFastPngBitmap.h +4 -8
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/bitmaps/spng.c +6980 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/bitmaps/spng.h +537 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/FinderUtils.cpp +101 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/FinderUtils.h +16 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/List.cpp +0 -3
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/List.h +4 -7
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/Lists.cpp +13 -13
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/Lists.h +5 -7
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/Node.cpp +47 -41
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/Node.h +15 -10
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/NodeCluster.cpp +181 -178
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/NodeCluster.h +19 -20
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/Polygon.h +20 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/PolygonFinder.cpp +52 -137
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/PolygonFinder.h +85 -16
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/RectBounds.h +39 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/ClippedPolygonFinder.cpp +14 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/ClippedPolygonFinder.h +17 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/Cluster.cpp +117 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/Cluster.h +32 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/Cursor.cpp +344 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/Cursor.h +46 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/EndPoint.cpp +14 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/EndPoint.h +22 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/FakeCluster.cpp +13 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/FakeCluster.h +17 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/Finder.cpp +138 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/Finder.h +52 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/Hub.cpp +23 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/Hub.h +40 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/Part.cpp +70 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/Part.h +47 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/PartPool.cpp +24 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/PartPool.h +23 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/Partitionable.cpp +182 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/Partitionable.h +30 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/Polyline.cpp +108 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/Polyline.h +52 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/Poolable.cpp +59 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/Poolable.h +52 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/Position.cpp +31 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/Position.h +25 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/Queue.h +36 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/Queueable.h +230 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/Sequence.cpp +35 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/Sequence.h +20 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/Shape.cpp +26 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/Shape.h +23 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/Tile.cpp +105 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/finder/concurrent/Tile.h +56 -0
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/matchers/Matcher.cpp +3 -3
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/matchers/Matcher.h +5 -8
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/matchers/RGBMatcher.h +3 -7
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/matchers/RGBNotMatcher.cpp +2 -2
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/matchers/RGBNotMatcher.h +4 -8
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/matchers/ValueNotMatcher.cpp +2 -2
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/matchers/ValueNotMatcher.h +3 -7
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/reducers/LinearReducer.cpp +23 -15
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/reducers/LinearReducer.h +6 -8
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/reducers/Reducer.cpp +2 -5
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/reducers/Reducer.h +4 -8
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/reducers/UniqReducer.cpp +9 -12
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/reducers/UniqReducer.h +3 -7
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/reducers/VisvalingamReducer.cpp +26 -27
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/reducers/VisvalingamReducer.h +76 -87
- data/ext/cpp_polygon_finder/cpp_polygon_finder.cpp +64 -32
- data/ext/cpp_polygon_finder/extconf.rb +14 -0
- data/lib/contrek/bitmaps/sample_generator.rb +56 -0
- data/lib/contrek/cpp/cpp_concurrent_finder.rb +9 -0
- data/lib/contrek/finder/bounds.rb +17 -0
- data/lib/contrek/finder/concurrent/cluster.rb +2 -2
- data/lib/contrek/finder/concurrent/cursor.rb +8 -8
- data/lib/contrek/finder/concurrent/finder.rb +10 -9
- data/lib/contrek/finder/concurrent/part.rb +2 -2
- data/lib/contrek/finder/concurrent/partitionable.rb +1 -1
- data/lib/contrek/finder/concurrent/polyline.rb +17 -15
- data/lib/contrek/finder/concurrent/sequence.rb +11 -0
- data/lib/contrek/finder/concurrent/tile.rb +3 -3
- data/lib/contrek/finder/node_cluster.rb +16 -8
- data/lib/contrek/finder/polygon_finder.rb +1 -4
- data/lib/contrek/version.rb +1 -1
- data/lib/contrek.rb +9 -1
- metadata +62 -15
- data/ext/cpp_polygon_finder/PolygonFinder/.cproject +0 -136
- data/ext/cpp_polygon_finder/PolygonFinder/.project +0 -27
- data/ext/cpp_polygon_finder/PolygonFinder/.settings/org.eclipse.ltk.core.refactoring.prefs +0 -2
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/bitmaps/PngBitmap.cpp +0 -48
- data/ext/cpp_polygon_finder/PolygonFinder/src/polygon/bitmaps/PngBitmap.h +0 -32
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
-
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
|
3
|
-
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
|
4
|
-
<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.230092677">
|
|
5
|
-
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.230092677" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
|
6
|
-
<externalSettings/>
|
|
7
|
-
<extensions>
|
|
8
|
-
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
9
|
-
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
10
|
-
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
11
|
-
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
12
|
-
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
13
|
-
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
|
14
|
-
</extensions>
|
|
15
|
-
</storageModule>
|
|
16
|
-
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
|
17
|
-
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.230092677" name="Debug" parent="cdt.managedbuild.config.gnu.exe.debug">
|
|
18
|
-
<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.230092677." name="/" resourcePath="">
|
|
19
|
-
<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.1239797023" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
|
|
20
|
-
<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.1171825928" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
|
|
21
|
-
<builder buildPath="${workspace_loc:/PolygonFinder}/Debug" id="cdt.managedbuild.target.gnu.builder.exe.debug.1257678896" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
|
|
22
|
-
<tool id="cdt.managedbuild.tool.gnu.archiver.base.1856002595" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
|
|
23
|
-
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.2115733171" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
|
|
24
|
-
<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.1326185101" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
|
25
|
-
<option id="gnu.cpp.compiler.exe.debug.option.debugging.level.1247115604" name="Debug Level" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
|
|
26
|
-
<option id="gnu.cpp.compiler.option.other.other.741409039" name="Other flags" superClass="gnu.cpp.compiler.option.other.other" useByScannerDiscovery="false" value="-c -fmessage-length=0 -std=c++11" valueType="string"/>
|
|
27
|
-
<option id="gnu.cpp.compiler.option.dialect.std.354652968" superClass="gnu.cpp.compiler.option.dialect.std" value="gnu.cpp.compiler.dialect.default" valueType="enumerated"/>
|
|
28
|
-
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.633512179" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
|
29
|
-
</tool>
|
|
30
|
-
<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1037594756" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug">
|
|
31
|
-
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.exe.debug.option.optimization.level.400575370" name="Optimization Level" superClass="gnu.c.compiler.exe.debug.option.optimization.level" useByScannerDiscovery="false" valueType="enumerated"/>
|
|
32
|
-
<option id="gnu.c.compiler.exe.debug.option.debugging.level.335517367" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
|
33
|
-
<option id="gnu.c.compiler.option.dialect.std.447995157" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.c.compiler.dialect.default" valueType="enumerated"/>
|
|
34
|
-
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.98002247" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
|
35
|
-
</tool>
|
|
36
|
-
<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.1946335522" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug"/>
|
|
37
|
-
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.888672614" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug">
|
|
38
|
-
<option id="gnu.cpp.link.option.libs.392256841" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
|
39
|
-
<listOptionValue builtIn="false" value="png"/>
|
|
40
|
-
</option>
|
|
41
|
-
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1499348319" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
|
42
|
-
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
|
43
|
-
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
|
44
|
-
</inputType>
|
|
45
|
-
</tool>
|
|
46
|
-
<tool id="cdt.managedbuild.tool.gnu.assembler.exe.debug.1643445143" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.debug">
|
|
47
|
-
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.2006340935" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
|
48
|
-
</tool>
|
|
49
|
-
</toolChain>
|
|
50
|
-
</folderInfo>
|
|
51
|
-
<sourceEntries>
|
|
52
|
-
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
|
|
53
|
-
</sourceEntries>
|
|
54
|
-
</configuration>
|
|
55
|
-
</storageModule>
|
|
56
|
-
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
|
57
|
-
</cconfiguration>
|
|
58
|
-
<cconfiguration id="cdt.managedbuild.config.gnu.exe.release.1889533389">
|
|
59
|
-
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.release.1889533389" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
|
60
|
-
<externalSettings/>
|
|
61
|
-
<extensions>
|
|
62
|
-
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
63
|
-
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
64
|
-
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
65
|
-
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
66
|
-
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
67
|
-
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
|
68
|
-
</extensions>
|
|
69
|
-
</storageModule>
|
|
70
|
-
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
|
71
|
-
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.release.1889533389" name="Release" parent="cdt.managedbuild.config.gnu.exe.release">
|
|
72
|
-
<folderInfo id="cdt.managedbuild.config.gnu.exe.release.1889533389." name="/" resourcePath="">
|
|
73
|
-
<toolChain id="cdt.managedbuild.toolchain.gnu.exe.release.1325837642" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.release">
|
|
74
|
-
<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.release.219395500" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.release"/>
|
|
75
|
-
<builder buildPath="${workspace_loc:/PolygonFinder}/Release" id="cdt.managedbuild.target.gnu.builder.exe.release.943964203" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.release"/>
|
|
76
|
-
<tool id="cdt.managedbuild.tool.gnu.archiver.base.1855153254" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
|
|
77
|
-
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.899886102" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release">
|
|
78
|
-
<option id="gnu.cpp.compiler.exe.release.option.optimization.level.981249657" name="Optimization Level" superClass="gnu.cpp.compiler.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
|
|
79
|
-
<option id="gnu.cpp.compiler.exe.release.option.debugging.level.302462699" name="Debug Level" superClass="gnu.cpp.compiler.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
|
|
80
|
-
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.561634342" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
|
81
|
-
</tool>
|
|
82
|
-
<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.release.327745473" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.release">
|
|
83
|
-
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.706749095" name="Optimization Level" superClass="gnu.c.compiler.exe.release.option.optimization.level" valueType="enumerated"/>
|
|
84
|
-
<option id="gnu.c.compiler.exe.release.option.debugging.level.2093011643" name="Debug Level" superClass="gnu.c.compiler.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
|
|
85
|
-
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.635848800" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
|
86
|
-
</tool>
|
|
87
|
-
<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.release.368376046" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.release"/>
|
|
88
|
-
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.release.1612063391" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.release">
|
|
89
|
-
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.6860118" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
|
90
|
-
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
|
91
|
-
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
|
92
|
-
</inputType>
|
|
93
|
-
</tool>
|
|
94
|
-
<tool id="cdt.managedbuild.tool.gnu.assembler.exe.release.860205816" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.release">
|
|
95
|
-
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1581025119" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
|
96
|
-
</tool>
|
|
97
|
-
</toolChain>
|
|
98
|
-
</folderInfo>
|
|
99
|
-
<sourceEntries>
|
|
100
|
-
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
|
|
101
|
-
</sourceEntries>
|
|
102
|
-
</configuration>
|
|
103
|
-
</storageModule>
|
|
104
|
-
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
|
105
|
-
</cconfiguration>
|
|
106
|
-
</storageModule>
|
|
107
|
-
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
|
108
|
-
<project id="PolygonFinder.cdt.managedbuild.target.gnu.exe.1715238056" name="Executable" projectType="cdt.managedbuild.target.gnu.exe"/>
|
|
109
|
-
</storageModule>
|
|
110
|
-
<storageModule moduleId="scannerConfiguration">
|
|
111
|
-
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
|
112
|
-
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.1889533389;cdt.managedbuild.config.gnu.exe.release.1889533389.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.327745473;cdt.managedbuild.tool.gnu.c.compiler.input.635848800">
|
|
113
|
-
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
|
114
|
-
</scannerConfigBuildInfo>
|
|
115
|
-
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.230092677;cdt.managedbuild.config.gnu.exe.debug.230092677.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1037594756;cdt.managedbuild.tool.gnu.c.compiler.input.98002247">
|
|
116
|
-
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
|
117
|
-
</scannerConfigBuildInfo>
|
|
118
|
-
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.230092677;cdt.managedbuild.config.gnu.exe.debug.230092677.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.2115733171;cdt.managedbuild.tool.gnu.cpp.compiler.input.633512179">
|
|
119
|
-
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
|
120
|
-
</scannerConfigBuildInfo>
|
|
121
|
-
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.1889533389;cdt.managedbuild.config.gnu.exe.release.1889533389.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.899886102;cdt.managedbuild.tool.gnu.cpp.compiler.input.561634342">
|
|
122
|
-
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
|
123
|
-
</scannerConfigBuildInfo>
|
|
124
|
-
</storageModule>
|
|
125
|
-
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
|
126
|
-
<storageModule moduleId="refreshScope" versionNumber="2">
|
|
127
|
-
<configuration configurationName="Release">
|
|
128
|
-
<resource resourceType="PROJECT" workspacePath="/PolygonFinder"/>
|
|
129
|
-
</configuration>
|
|
130
|
-
<configuration configurationName="Debug">
|
|
131
|
-
<resource resourceType="PROJECT" workspacePath="/PolygonFinder"/>
|
|
132
|
-
</configuration>
|
|
133
|
-
</storageModule>
|
|
134
|
-
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
|
135
|
-
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
|
136
|
-
</cproject>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<projectDescription>
|
|
3
|
-
<name>PolygonFinder</name>
|
|
4
|
-
<comment></comment>
|
|
5
|
-
<projects>
|
|
6
|
-
</projects>
|
|
7
|
-
<buildSpec>
|
|
8
|
-
<buildCommand>
|
|
9
|
-
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
|
10
|
-
<triggers>clean,full,incremental,</triggers>
|
|
11
|
-
<arguments>
|
|
12
|
-
</arguments>
|
|
13
|
-
</buildCommand>
|
|
14
|
-
<buildCommand>
|
|
15
|
-
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
|
16
|
-
<triggers>full,incremental,</triggers>
|
|
17
|
-
<arguments>
|
|
18
|
-
</arguments>
|
|
19
|
-
</buildCommand>
|
|
20
|
-
</buildSpec>
|
|
21
|
-
<natures>
|
|
22
|
-
<nature>org.eclipse.cdt.core.cnature</nature>
|
|
23
|
-
<nature>org.eclipse.cdt.core.ccnature</nature>
|
|
24
|
-
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
|
25
|
-
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
|
26
|
-
</natures>
|
|
27
|
-
</projectDescription>
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* PngBitmap.cpp
|
|
3
|
-
*
|
|
4
|
-
* Created on: 03 dic 2018
|
|
5
|
-
* Author: ema
|
|
6
|
-
* Copyright 2025 Emanuele Cesaroni
|
|
7
|
-
*/
|
|
8
|
-
// http://www.piko3d.net/tutorials/libpng-tutorial-loading-png-files-from-streams/
|
|
9
|
-
#include "PngBitmap.h"
|
|
10
|
-
#include <stdlib.h>
|
|
11
|
-
#include <stdio.h>
|
|
12
|
-
#include <string>
|
|
13
|
-
#include <iostream>
|
|
14
|
-
#include <typeinfo>
|
|
15
|
-
#include "../matchers/RGBMatcher.h"
|
|
16
|
-
#include "../matchers/RGBNotMatcher.h"
|
|
17
|
-
#include "png++/png.hpp"
|
|
18
|
-
|
|
19
|
-
PngBitmap::PngBitmap(std::string filename) : Bitmap("", 0) {
|
|
20
|
-
this->image = png::image< png::rgb_pixel >(filename);
|
|
21
|
-
this->width = image.get_width();
|
|
22
|
-
this->height = image.get_height();
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
bool PngBitmap::pixel_match(int x, int y, Matcher *matcher)
|
|
26
|
-
{ png::basic_rgb_pixel<unsigned char> pixel = image.get_pixel(x, y);
|
|
27
|
-
unsigned int color = pixel.blue + (pixel.green << 8) + (pixel.red << 16);
|
|
28
|
-
|
|
29
|
-
if (typeid(*matcher) == typeid(RGBMatcher)) return(((RGBMatcher*) matcher)->match(color));
|
|
30
|
-
if (typeid(*matcher) == typeid(RGBNotMatcher)) return(((RGBNotMatcher*) matcher)->match(color));
|
|
31
|
-
return(false);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
PngBitmap::~PngBitmap() {
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
int PngBitmap::w() {
|
|
39
|
-
return this->width;
|
|
40
|
-
}
|
|
41
|
-
int PngBitmap::h() {
|
|
42
|
-
return this->height;
|
|
43
|
-
}
|
|
44
|
-
char PngBitmap::value_at(int x, int y) {
|
|
45
|
-
png::basic_rgb_pixel<unsigned char> pixel = image.get_pixel(x, y);
|
|
46
|
-
char color = pixel.blue | pixel.green | pixel.red;
|
|
47
|
-
return(color);
|
|
48
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* PngBitmap.h
|
|
3
|
-
*
|
|
4
|
-
* Created on: 03 dic 2018
|
|
5
|
-
* Author: ema
|
|
6
|
-
* Copyright 2025 Emanuele Cesaroni
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
#ifndef POLYGON_BITMAPS_PNGBITMAP_H_
|
|
10
|
-
#define POLYGON_BITMAPS_PNGBITMAP_H_
|
|
11
|
-
|
|
12
|
-
#include "Bitmap.h"
|
|
13
|
-
#include <string>
|
|
14
|
-
#include "png++/png.hpp"
|
|
15
|
-
|
|
16
|
-
class RGBMatcher;
|
|
17
|
-
|
|
18
|
-
class PngBitmap : public Bitmap {
|
|
19
|
-
public:
|
|
20
|
-
PngBitmap(std::string filename);
|
|
21
|
-
virtual ~PngBitmap();
|
|
22
|
-
bool pixel_match(int x, int y, Matcher *matcher);
|
|
23
|
-
int h();
|
|
24
|
-
int w();
|
|
25
|
-
char value_at(int x, int y);
|
|
26
|
-
private:
|
|
27
|
-
unsigned int width;
|
|
28
|
-
unsigned int height;
|
|
29
|
-
png::image< png::rgb_pixel> image;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
#endif /* POLYGON_BITMAPS_PNGBITMAP_H_ */
|