]> git.llucax.com Git - z.facultad/75.42/plaqui.git/commitdiff
* 2 nuevos ejemplos (el 2_circuitos no tiene desperdicio)
authorRicardo Markiewicz <gazer.arg@gmail.com>
Tue, 2 Dec 2003 02:16:33 +0000 (02:16 +0000)
committerRicardo Markiewicz <gazer.arg@gmail.com>
Tue, 2 Dec 2003 02:16:33 +0000 (02:16 +0000)
 * se arreglan las coordenadas de dibujo sobre la union

Client/src/item_union.cpp
Samples/2_circuitos.xml [new file with mode: 0644]
Samples/test_de_fuego.xml [new file with mode: 0644]

index 27791a2c0d0fb589561c7e59f49375de9a3610e9..c6a16152ebdffbfa94bb27abbf920084fa45f945 100644 (file)
@@ -45,16 +45,16 @@ bool ViewUnion::on_image_expose_event(GdkEventExpose *e)
                                image.get_window()->draw_rectangle(gc, 1, 0, 13, w, 6);
                        break;
                        case 1:
-                               image.get_window()->draw_rectangle(gc, 1, 0, h/2-3, w/2, 6);
-                               image.get_window()->draw_rectangle(gc, 1, 51, 0, 6, h);
+                               image.get_window()->draw_rectangle(gc, 1, 0, h/2-3, 48, 6);
+                               image.get_window()->draw_rectangle(gc, 1, 45, 0, 6, h);
                        break;
                        case 2:
-                               image.get_window()->draw_rectangle(gc, 1, w/2-3, 0, 6, h/2);
-                               image.get_window()->draw_rectangle(gc, 1, 0, 51, w, 6);
+                               image.get_window()->draw_rectangle(gc, 1, w/2-3, 0, 6, 48);
+                               image.get_window()->draw_rectangle(gc, 1, 0, 45, w, 6);
                        break;
                        case 3:
-                               image.get_window()->draw_rectangle(gc, 1, w/2, h/2-3, w/2, 6);
-                               image.get_window()->draw_rectangle(gc, 1, 16, 0, 6, h);
+                               image.get_window()->draw_rectangle(gc, 1, 16, h/2-3, 48, 6);
+                               image.get_window()->draw_rectangle(gc, 1, 13, 0, 6, h);
                }
        }
        return true;
diff --git a/Samples/2_circuitos.xml b/Samples/2_circuitos.xml
new file mode 100644 (file)
index 0000000..09601e7
--- /dev/null
@@ -0,0 +1,193 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<planta>
+       <bomba nombre="bomba0" id="0">
+               <entrega>10,00</entrega>
+               <color>
+                       <rojo>51609</rojo>
+                       <verde>41037</verde>
+                       <azul>27677</azul>
+               </color>
+               <conector>
+                       <salida>union1</salida>
+               </conector>
+               <orientacion>0</orientacion>
+               <x>64</x>
+               <y>96</y>
+       </bomba>
+       <empalme nombre="union1" id="1">
+               <tipo>union</tipo>
+               <conector>
+                       <entrada>bomba0</entrada>
+                       <entrada>bomba2</entrada>
+                       <salida>tubo3</salida>
+               </conector>
+               <caudal>10,00</caudal>
+               <orientacion>0</orientacion>
+               <x>160</x>
+               <y>96</y>
+       </empalme>
+       <bomba nombre="bomba2" id="2">
+               <entrega>10,00</entrega>
+               <color>
+                       <rojo>51984</rojo>
+                       <verde>48747</verde>
+                       <azul>23713</azul>
+               </color>
+               <conector>
+                       <salida>union1</salida>
+               </conector>
+               <orientacion>1</orientacion>
+               <x>256</x>
+               <y>96</y>
+       </bomba>
+       <tubo nombre="tubo3" id="3">
+               <caudal>10,00</caudal>
+               <conector>
+                       <entrada>union1</entrada>
+                       <salida>drenaje4</salida>
+               </conector>
+               <orientacion>0</orientacion>
+               <x>192</x>
+               <y>160</y>
+       </tubo>
+       <drenaje nombre="drenaje4" id="4">
+               <conector>
+                       <entrada>tubo3</entrada>
+               </conector>
+               <orientacion>0</orientacion>
+               <x>192</x>
+               <y>256</y>
+       </drenaje>
+       <bomba nombre="bomba5" id="5">
+               <entrega>10,00</entrega>
+               <color>
+                       <rojo>65535</rojo>
+                       <verde>65535</verde>
+                       <azul>0</azul>
+               </color>
+               <conector>
+                       <salida>division7</salida>
+               </conector>
+               <orientacion>0</orientacion>
+               <x>32</x>
+               <y>480</y>
+       </bomba>
+       <bomba nombre="bomba6" id="6">
+               <entrega>10,00</entrega>
+               <color>
+                       <rojo>0</rojo>
+                       <verde>65535</verde>
+                       <azul>65535</azul>
+               </color>
+               <conector>
+                       <salida>division11</salida>
+               </conector>
+               <orientacion>1</orientacion>
+               <x>416</x>
+               <y>480</y>
+       </bomba>
+       <empalme nombre="division7" id="7">
+               <tipo>division</tipo>
+               <conector>
+                       <salida>codo9</salida>
+                       <salida>codo12</salida>
+                       <entrada>bomba5</entrada>
+               </conector>
+               <caudal>10,00</caudal>
+               <orientacion>1</orientacion>
+               <x>128</x>
+               <y>448</y>
+       </empalme>
+       <empalme nombre="union8" id="8">
+               <tipo>union</tipo>
+               <conector>
+                       <entrada>codo10</entrada>
+                       <entrada>codo9</entrada>
+                       <salida>drenaje17</salida>
+               </conector>
+               <caudal>10,00</caudal>
+               <orientacion>2</orientacion>
+               <x>224</x>
+               <y>352</y>
+       </empalme>
+       <codo nombre="codo9" id="9">
+               <caudal>10,00</caudal>
+               <conector>
+                       <entrada>division7</entrada>
+                       <salida>union8</salida>
+               </conector>
+               <orientacion>3</orientacion>
+               <x>160</x>
+               <y>384</y>
+       </codo>
+       <codo nombre="codo10" id="10">
+               <caudal>10,00</caudal>
+               <conector>
+                       <salida>union8</salida>
+                       <entrada>division11</entrada>
+               </conector>
+               <orientacion>0</orientacion>
+               <x>320</x>
+               <y>384</y>
+       </codo>
+       <empalme nombre="division11" id="11">
+               <tipo>division</tipo>
+               <conector>
+                       <salida>codo13</salida>
+                       <salida>codo10</salida>
+                       <entrada>bomba6</entrada>
+               </conector>
+               <caudal>10,00</caudal>
+               <orientacion>3</orientacion>
+               <x>352</x>
+               <y>448</y>
+       </empalme>
+       <codo nombre="codo12" id="12">
+               <caudal>10,00</caudal>
+               <conector>
+                       <salida>union14</salida>
+                       <entrada>division7</entrada>
+               </conector>
+               <orientacion>2</orientacion>
+               <x>160</x>
+               <y>544</y>
+       </codo>
+       <codo nombre="codo13" id="13">
+               <caudal>10,00</caudal>
+               <conector>
+                       <entrada>division11</entrada>
+                       <salida>union14</salida>
+               </conector>
+               <orientacion>1</orientacion>
+               <x>320</x>
+               <y>544</y>
+       </codo>
+       <empalme nombre="union14" id="14">
+               <tipo>union</tipo>
+               <conector>
+                       <entrada>codo12</entrada>
+                       <entrada>codo13</entrada>
+                       <salida>drenaje16</salida>
+               </conector>
+               <caudal>10,00</caudal>
+               <orientacion>0</orientacion>
+               <x>224</x>
+               <y>576</y>
+       </empalme>
+       <drenaje nombre="drenaje16" id="16">
+               <conector>
+                       <entrada>union14</entrada>
+               </conector>
+               <orientacion>0</orientacion>
+               <x>256</x>
+               <y>640</y>
+       </drenaje>
+       <drenaje nombre="drenaje17" id="17">
+               <conector>
+                       <entrada>union8</entrada>
+               </conector>
+               <orientacion>2</orientacion>
+               <x>256</x>
+               <y>320</y>
+       </drenaje>
+</planta>
diff --git a/Samples/test_de_fuego.xml b/Samples/test_de_fuego.xml
new file mode 100644 (file)
index 0000000..c3c34f3
--- /dev/null
@@ -0,0 +1,223 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<planta>
+       <bomba nombre="bomba0" id="0">
+               <entrega>10,00</entrega>
+               <color>
+                       <rojo>65535</rojo>
+                       <verde>61958</verde>
+                       <azul>0</azul>
+               </color>
+               <conector>
+                       <salida>union1</salida>
+               </conector>
+               <orientacion>0</orientacion>
+               <x>64</x>
+               <y>128</y>
+       </bomba>
+       <empalme nombre="union1" id="1">
+               <tipo>union</tipo>
+               <conector>
+                       <entrada>bomba0</entrada>
+                       <entrada>division2</entrada>
+                       <salida>tubo11</salida>
+               </conector>
+               <caudal>10,00</caudal>
+               <orientacion>0</orientacion>
+               <x>160</x>
+               <y>128</y>
+       </empalme>
+       <empalme nombre="division2" id="2">
+               <tipo>division</tipo>
+               <conector>
+                       <salida>union5</salida>
+                       <salida>union1</salida>
+                       <entrada>codo3</entrada>
+               </conector>
+               <caudal>10,00</caudal>
+               <orientacion>2</orientacion>
+               <x>256</x>
+               <y>96</y>
+       </empalme>
+       <codo nombre="codo3" id="3">
+               <caudal>10,00</caudal>
+               <conector>
+                       <entrada>bomba4</entrada>
+                       <salida>division2</salida>
+               </conector>
+               <orientacion>0</orientacion>
+               <x>256</x>
+               <y>32</y>
+       </codo>
+       <bomba nombre="bomba4" id="4">
+               <entrega>10,00</entrega>
+               <color>
+                       <rojo>65535</rojo>
+                       <verde>0</verde>
+                       <azul>0</azul>
+               </color>
+               <conector>
+                       <salida>codo3</salida>
+               </conector>
+               <orientacion>0</orientacion>
+               <x>160</x>
+               <y>32</y>
+       </bomba>
+       <empalme nombre="union5" id="5">
+               <tipo>union</tipo>
+               <conector>
+                       <entrada>division2</entrada>
+                       <entrada>bomba6</entrada>
+                       <salida>exclusa9</salida>
+               </conector>
+               <caudal>10,00</caudal>
+               <orientacion>0</orientacion>
+               <x>352</x>
+               <y>128</y>
+       </empalme>
+       <bomba nombre="bomba6" id="6">
+               <entrega>10,00</entrega>
+               <color>
+                       <rojo>65535</rojo>
+                       <verde>0</verde>
+                       <azul>52020</azul>
+               </color>
+               <conector>
+                       <salida>union5</salida>
+               </conector>
+               <orientacion>1</orientacion>
+               <x>448</x>
+               <y>128</y>
+       </bomba>
+       <tanque nombre="tanque7" id="7">
+               <capacidad>100,00</capacidad>
+               <inicial>0,00</inicial>
+               <color>
+                       <rojo>0</rojo>
+                       <verde>0</verde>
+                       <azul>0</azul>
+               </color>
+               <conector>
+                       <entrada>exclusa9</entrada>
+                       <salida>drenaje10</salida>
+               </conector>
+               <flotantes>
+               <superior>80</superior>
+                       <inferior>20</inferior>
+               </flotantes>
+                       <orientacion>0</orientacion>
+               <x>384</x>
+               <y>256</y>
+       </tanque>
+       <exclusa nombre="exclusa9" id="9">
+               <conector>
+                       <entrada>union5</entrada>
+                       <salida>tanque7</salida>
+               </conector>
+               <orientacion>1</orientacion>
+               <estado>1</estado>
+               <x>384</x>
+               <y>192</y>
+       </exclusa>
+       <drenaje nombre="drenaje10" id="10">
+               <conector>
+                       <entrada>tanque7</entrada>
+               </conector>
+               <orientacion>3</orientacion>
+               <x>448</x>
+               <y>288</y>
+       </drenaje>
+       <tubo nombre="tubo11" id="11">
+               <caudal>10,00</caudal>
+               <conector>
+                       <entrada>union1</entrada>
+                       <salida>union12</salida>
+               </conector>
+               <orientacion>0</orientacion>
+               <x>192</x>
+               <y>192</y>
+       </tubo>
+       <empalme nombre="union12" id="12">
+               <tipo>union</tipo>
+               <conector>
+                       <entrada>codo13</entrada>
+                       <entrada>tubo11</entrada>
+                       <salida>codo15</salida>
+               </conector>
+               <caudal>10,00</caudal>
+               <orientacion>3</orientacion>
+               <x>192</x>
+               <y>288</y>
+       </empalme>
+       <codo nombre="codo13" id="13">
+               <caudal>10,00</caudal>
+               <conector>
+                       <salida>union12</salida>
+                       <entrada>bomba14</entrada>
+               </conector>
+               <orientacion>1</orientacion>
+               <x>160</x>
+               <y>384</y>
+       </codo>
+       <bomba nombre="bomba14" id="14">
+               <entrega>10,00</entrega>
+               <color>
+                       <rojo>0</rojo>
+                       <verde>62485</verde>
+                       <azul>65535</azul>
+               </color>
+               <conector>
+                       <salida>codo13</salida>
+               </conector>
+               <orientacion>0</orientacion>
+               <x>64</x>
+               <y>416</y>
+       </bomba>
+       <codo nombre="codo15" id="15">
+               <caudal>10,00</caudal>
+               <conector>
+                       <entrada>union12</entrada>
+                       <salida>tanque16</salida>
+               </conector>
+               <orientacion>0</orientacion>
+               <x>256</x>
+               <y>320</y>
+       </codo>
+       <tanque nombre="tanque16" id="16">
+               <capacidad>100,00</capacidad>
+               <inicial>0,00</inicial>
+               <color>
+                       <rojo>0</rojo>
+                       <verde>0</verde>
+                       <azul>0</azul>
+               </color>
+               <conector>
+                       <entrada>codo15</entrada>
+                       <salida>tubo17</salida>
+               </conector>
+               <flotantes>
+               <superior>80</superior>
+                       <inferior>20</inferior>
+               </flotantes>
+                       <orientacion>0</orientacion>
+               <x>288</x>
+               <y>384</y>
+       </tanque>
+       <tubo nombre="tubo17" id="17">
+               <caudal>10,00</caudal>
+               <conector>
+                       <entrada>tanque16</entrada>
+                       <salida>drenaje18</salida>
+               </conector>
+               <orientacion>1</orientacion>
+               <x>352</x>
+               <y>416</y>
+       </tubo>
+       <drenaje nombre="drenaje18" id="18">
+               <conector>
+                       <entrada>tubo17</entrada>
+               </conector>
+               <orientacion>3</orientacion>
+               <x>448</x>
+               <y>416</y>
+       </drenaje>
+</planta>