<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.0.4" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>BrauSoft</title>
	<link>http://www.brausoft.com</link>
	<description>Desarrollo de software</description>
	<pubDate>Wed, 26 Sep 2007 22:23:43 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.4</generator>
	<language>en</language>
			<item>
		<title>Herramienta para crear fuentes</title>
		<link>http://www.brausoft.com/2007/09/27/herramienta-para-crear-fuentes/</link>
		<comments>http://www.brausoft.com/2007/09/27/herramienta-para-crear-fuentes/#comments</comments>
		<pubDate>Wed, 26 Sep 2007 22:23:43 +0000</pubDate>
		<dc:creator>brausoft</dc:creator>
		
	<category>Otros Proyectos</category>
	<category>Motor Aventura Gráfica</category>
	<category>Artículos</category>
		<guid isPermaLink="false">http://www.brausoft.com/2007/09/27/herramienta-para-crear-fuentes/</guid>
		<description><![CDATA[Esta aplicación permite exportar las fuentes instaladas en el sistema como una imagen a un fichero del tipo bmp, gif, png o jpg y un fichero que describe la ubicación y dimensiones de cada carácter dentro de la imagen.
Se permite indicar los caracteres a exportar no teniendo porque exportar todos. Dispone de un menú para [...]]]></description>
			<content:encoded><![CDATA[<p>Esta aplicación permite exportar las fuentes instaladas en el sistema como una imagen a un fichero del tipo bmp, gif, png o jpg y un fichero que describe la ubicación y dimensiones de cada carácter dentro de la imagen.</p>
<p>Se permite indicar los caracteres a exportar no teniendo porque exportar todos. Dispone de un menú para seleccionar los caracteres más comunes como las minúsculas, las mayúsculas, los dígitos del 0 al 9, etc. lo que evita al usuario tener que teclear dichos caracteres.</p>
<p>También se permite configurar el tipo de fuente, su tamaño, color, si esta en negrita, cursiva, el formato de la imagen (png, bmp, gif, jpg), las dimensiones de la imagen, el color que será considerado como transparente y el espacio que se dejará entre caracteres. La imagen puede crearse haciendo uso del anti-aliasing, lo cual tiene la ventaja de que los bordes de las caracteres quedan más suavizados.</p>
<p>Todos los datos establecidos en la la herramienta se conservan para la siguiente ejecución, con lo que no es necesario volver a introducir dichos datos.</p>
<p>Se ofrece la posibilidad de previsualizar la imagen antes de proceder a su exportación.</p>
<div style="text-align: center">(Pulsad la imagen para verla a tamaño real)</div>
<div style="text-align: center"><a href="#"><img style="width:100%" title="Creador de fuentes." alt="Creador de fuentes." onclick="mostrarImagen(this); return false" src="/Ficheros/exportadorfuentes.PNG" /></a></div>
<div style="text-align: center">Creador de fuentes.</div>
<p>Una de las características más interesantes de la herramienta es la enorme flexibilidad para exportar los datos a diferentes formatos y la facilidad para incorporar nuevos formatos personalizados mediante un sistema de plugins. </p>
<p>Independientemente del formato de exportación, los valores que se guardarán en el fichero serán el ancho y el alto de la imagen en pixeles, el espacio entre caracteres y por cada carácter la posición expresada en pixels tanto en X como en Y y el ancho y alto del carácter.</p>
<p>Inicialmente la herramienta cuenta con cinco formatos para exportar las fuentes:<br />
	- Fichero CSV: Valores separados por comas (en este paso por <img src='http://www.brausoft.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
	- Fichero XML: XML donde cada carácter es un nodo, que contiene cuatro nodos hijos con los diferentes valores<br />
	- Fichero XML Atributos: XML donde cada carácter es un nodo que tiene cuatro atributos con los diferentes valores<br />
	- Fichero Binario: Los datos se guardan en un fichero binario<br />
	- Fichero Texto: Los datos se guardan como texto plano</p>
<p>La forma de crear plugins para extender la funcionalidad de la herramienta incorporándola nuevos formatos de exportación consiste en crear una dll que contenga la clase o clases con los nuevos formatos. Cada clase que proporcione un nuevo formato debe implementar la interfaz IPersistir que tiene la siguiente definición:</p>
<p>&nbsp;</p>
<div class="igBar"><span id="lvbnet-3"><a href="#" onclick="maximizar('vbnet-3'); return false;">MAXIMIZAR</a> <a href="#" onclick="javascript:showPlainTxt('vbnet-3'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">VB.NET:</span><br />
<div id="vbnet-3">
<div class="vbnet">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0600FF;">Public</span> <span style="color: #0600FF;">Interface</span> IPersistir</div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' &lt;summary&gt;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' Nombre del plugin</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' &lt;/summary&gt;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' &lt;value&gt;&lt;/value&gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' &lt;returns&gt;&lt;/returns&gt;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' &lt;remarks&gt;&lt;/remarks&gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0600FF;">ReadOnly</span> <span style="color: #0600FF;">Property</span> Nombre<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0600FF;">As</span> <span style="color: #0600FF;">String</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' &lt;summary&gt;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' Escribe en un fichero la información de la fuente</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' &lt;/summary&gt;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' &lt;param name=&quot;ficheroSalidaSinExtension&quot;&gt;Ruta del fichero (sin incluir la extension) en el que</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' se escribirá la información de los caracteres&lt;/param&gt;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' &lt;param name=&quot;anchoImagen&quot;&gt;Ancho en pixeles de la imagen&lt;/param&gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' &lt;param name=&quot;altoImagen&quot;&gt;Alto en pixeles de la imagen&lt;/param&gt;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' &lt;param name=&quot;separacionEntreCaracteres&quot;&gt;Número de pixels de separación entre carácter y carácter&lt;/param&gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' &lt;param name=&quot;caracteres&quot;&gt;Carácteres a escribir junto con su información&lt;/param&gt;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' &lt;remarks&gt;&lt;/remarks&gt;&nbsp; &nbsp; </span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0600FF;">Sub</span> Escribir<span style="color: #000000;">&#40;</span><span style="color: #0600FF;">ByVal</span> ficheroSalidaSinExtension <span style="color: #0600FF;">As</span> <span style="color: #0600FF;">String</span>, <span style="color: #0600FF;">ByVal</span> anchoImagen <span style="color: #0600FF;">As</span> <span style="color: #0600FF;">Integer</span>, <span style="color: #0600FF;">ByVal</span> altoImagen <span style="color: #0600FF;">As</span> <span style="color: #0600FF;">Integer</span>, <span style="color: #0600FF;">ByVal</span> separacionEntreCaracteres <span style="color: #0600FF;">As</span> <span style="color: #0600FF;">Integer</span>, <span style="color: #0600FF;">ByVal</span> caracteres <span style="color: #0600FF;">As</span> <a href="http://www.google.com/search?q=DICTIONARY+msdn.microsoft.com"><span style="color: #008000;">Dictionary</span></a><span style="color: #000000;">&#40;</span>Of Char, Rectangle<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Interface</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>&nbsp;</p>
<p>El nombre del plugin será el que posteriormente se mostrará dentro del menú "Guardar Como" de la herramienta</p>
<p>Como ejemplo se muestra a continuación la implementación del plugin que permite guardar los datos como XML con atributos:</p>
<p>&nbsp;</p>
<div class="igBar"><span id="lvbnet-4"><a href="#" onclick="maximizar('vbnet-4'); return false;">MAXIMIZAR</a> <a href="#" onclick="javascript:showPlainTxt('vbnet-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">VB.NET:</span><br />
<div id="vbnet-4">
<div class="vbnet">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0600FF;">Imports</span> ExportadorFuentes</div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0600FF;">Public</span> <span style="color: #0600FF;">Class</span> PersistirXMLAtributos</div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0600FF;">Implements</span> IPersistir</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0600FF;">Public</span> <span style="color: #0600FF;">ReadOnly</span> <span style="color: #0600FF;">Property</span> Nombre<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0600FF;">As</span> <span style="color: #0600FF;">String</span> <span style="color: #0600FF;">Implements</span> IPersistir.<span style="color: #000000;">Nombre</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Get</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Return</span> <span style="color: #A31515;">"XML Atributos"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Get</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Property</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0600FF;">Public</span> <span style="color: #0600FF;">Sub</span> Escribir<span style="color: #000000;">&#40;</span><span style="color: #0600FF;">ByVal</span> ficheroSalidaSinExtension <span style="color: #0600FF;">As</span> <span style="color: #0600FF;">String</span>, <span style="color: #0600FF;">ByVal</span> anchoImagen <span style="color: #0600FF;">As</span> <span style="color: #0600FF;">Integer</span>, <span style="color: #0600FF;">ByVal</span> altoImagen <span style="color: #0600FF;">As</span> <span style="color: #0600FF;">Integer</span>, <span style="color: #0600FF;">ByVal</span> separacionEntreCaracteres <span style="color: #0600FF;">As</span> <span style="color: #0600FF;">Integer</span>, <span style="color: #0600FF;">ByVal</span> caracteres <span style="color: #0600FF;">As</span> System.<span style="color: #000000;">Collections</span>.<span style="color: #000000;">Generic</span>.<a href="http://www.google.com/search?q=DICTIONARY+msdn.microsoft.com"><span style="color: #008000;">Dictionary</span></a><span style="color: #000000;">&#40;</span>Of Char, System.<span style="color: #000000;">Drawing</span>.<span style="color: #000000;">Rectangle</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #0600FF;">Implements</span> IPersistir.<span style="color: #000000;">Escribir</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Dim</span> w <span style="color: #0600FF;">As</span> Xml.<span style="color: #000000;">XmlTextWriter</span> = <span style="color: #0600FF;">Nothing</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Dim</span> c <span style="color: #0600FF;">As</span> Char</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Try</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; w = <span style="color: #0600FF;">New</span> Xml.<span style="color: #000000;">XmlTextWriter</span><span style="color: #000000;">&#40;</span>ficheroSalidaSinExtension &amp; <span style="color: #A31515;">".xml"</span>, System.<span style="color: #000000;">Text</span>.<span style="color: #000000;">Encoding</span>.<span style="color: #000000;">UTF8</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; w.<span style="color: #000000;">Formatting</span> = Xml.<span style="color: #000000;">Formatting</span>.<span style="color: #000000;">Indented</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; w.<span style="color: #000000;">WriteStartElement</span><span style="color: #000000;">&#40;</span><span style="color: #A31515;">"Fuente"</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; w.<span style="color: #000000;">WriteAttributeString</span><span style="color: #000000;">&#40;</span><span style="color: #A31515;">"AnchoImagen"</span>, anchoImagen.<span style="color: #000000;">ToString</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; w.<span style="color: #000000;">WriteAttributeString</span><span style="color: #000000;">&#40;</span><span style="color: #A31515;">"AltoImagen"</span>, altoImagen.<span style="color: #000000;">ToString</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; w.<span style="color: #000000;">WriteAttributeString</span><span style="color: #000000;">&#40;</span><span style="color: #A31515;">"SeparacionEntreCaracteres"</span>, separacionEntreCaracteres.<span style="color: #000000;">ToString</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; w.<span style="color: #000000;">WriteEndElement</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">For</span> <span style="color: #0600FF;">Each</span> c In caracteres.<span style="color: #000000;">Keys</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; w.<span style="color: #000000;">WriteStartElement</span><span style="color: #000000;">&#40;</span>c.<span style="color: #000000;">ToString</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; w.<span style="color: #000000;">WriteAttributeString</span><span style="color: #000000;">&#40;</span><span style="color: #A31515;">"X"</span>, caracteres<span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span>.<span style="color: #FF00FF;">Left</span>.<span style="color: #000000;">ToString</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; w.<span style="color: #000000;">WriteAttributeString</span><span style="color: #000000;">&#40;</span><span style="color: #A31515;">"Y"</span>, caracteres<span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span>.<span style="color: #000000;">Top</span>.<span style="color: #000000;">ToString</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; w.<span style="color: #000000;">WriteAttributeString</span><span style="color: #000000;">&#40;</span><span style="color: #A31515;">"Ancho"</span>, caracteres<span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span>.<span style="color: #0600FF;">Width</span>.<span style="color: #000000;">ToString</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; w.<span style="color: #000000;">WriteAttributeString</span><span style="color: #000000;">&#40;</span><span style="color: #A31515;">"Alto"</span>, caracteres<span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span>.<span style="color: #000000;">Height</span>.<span style="color: #000000;">ToString</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; w.<span style="color: #000000;">WriteEndElement</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Next</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Catch</span> ex <span style="color: #0600FF;">As</span> Exception</div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF00FF;">MsgBox</span><span style="color: #000000;">&#40;</span>ex.<span style="color: #000000;">Message</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Finally</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">If</span> <span style="color: #0600FF;">Not</span> w <span style="color: #0600FF;">Is</span> <span style="color: #0600FF;">Nothing</span> <span style="color: #0600FF;">Then</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; w.<span style="color: #FF00FF;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Try</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Sub</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Class</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>&nbsp;</p>
<p>La dll con el o los plugins debe copiarse en el mismo directorio en que se encuentre el ejecutable de la aplicación.</p>
<p>La herramienta ha sido desarrollada en Visual Basic.NET (VB.NET) y están disponibles para su descarga en la sección de <a href="/descargas/">descargas</a> tanto el código fuente como los ejecutables.</p>
<p>La solución cuenta con dos proyectos: el creador o exportador de fuentes y uno para los plugins. El proyecto del exportador o creador de fuentes consta principalmente de dos elementos, el interfaz IPersistir y el formulario que es el que realiza la mayoría de las acciones. El proyecto de los plugins cuenta con cinco clases que implementan otros tantos tipos de formas de exportar los datos.</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.brausoft.com/2007/09/27/herramienta-para-crear-fuentes/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Heredar de un Singleton</title>
		<link>http://www.brausoft.com/2007/09/19/heredar-de-un-singleton/</link>
		<comments>http://www.brausoft.com/2007/09/19/heredar-de-un-singleton/#comments</comments>
		<pubDate>Wed, 19 Sep 2007 21:56:18 +0000</pubDate>
		<dc:creator>brausoft</dc:creator>
		
	<category>General</category>
	<category>Artículos</category>
		<guid isPermaLink="false">http://www.brausoft.com/2007/09/19/heredar-de-un-singleton/</guid>
		<description><![CDATA[En un post anterior ya hablé del patrón de diseño Singleton.
Una de las limitaciones de este patrón es la dificultad de crear una clase singleton base y crear varias clases derivadas o hijas que hereden de ella adquiriendo el comportamiento de la clase Padre, lo cual incluye además del comportamiento como singleton cualquier otra funcionalidad [...]]]></description>
			<content:encoded><![CDATA[<p>En un <a href="/2007/07/26/singleton-mas-legible-y-accesible-en-vbnet/">post anterior</a> ya hablé del patrón de diseño Singleton.</p>
<p>Una de las limitaciones de este patrón es la dificultad de crear una clase singleton base y crear varias clases derivadas o hijas que hereden de ella adquiriendo el comportamiento de la clase Padre, lo cual incluye además del comportamiento como singleton cualquier otra funcionalidad común que se desee añadir.</p>
<p>La dificultad parte del hecho de que si declaramos la variable Instancia como static (en C#) o shared (en VB.NET), dicha variable será compartida por todas las clases derivadas.</p>
<p>El problema de heredar de una clase singleton es que al pertenecer la instancia privada (declarada como shared en VB.NET y como static en C#) a la clase padre será compartida por todas las clases derivadas. Por lo que cuando en cada una de las clases derivadas hagamos el GetInstance obtendremos siempre la misma instancia de la misma clase derivada (que será la que realice el primer GetInstance que es donde se instancia dicha clase.</p>
<p>En este artículo se aporta una posible solución a este problema. Para ello realmente no se utiliza herencia sino Generics, aunque el resultado es similar y se da solución al problema planteado.</p>
<p>Las clases "derivadas" (que como ya hemos comentado realmente no heredan de la clase genérica) el único código adicional al que tuvieran que deben incorporar es declarar un constructor privado para evitar que sean instanciadas con lo que se vulneraría uno de los requisitos básicos del patrón singleton que es que solo puede existir una instancia de la clase.</p>
<p>&nbsp;</p>
<div class="igBar"><span id="lvbnet-7"><a href="#" onclick="maximizar('vbnet-7'); return false;">MAXIMIZAR</a> <a href="#" onclick="javascript:showPlainTxt('vbnet-7'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">VB.NET:</span><br />
<div id="vbnet-7">
<div class="vbnet">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0600FF;">Public</span> <span style="color: #0600FF;">Class</span> SingletonGenerico<span style="color: #000000;">&#40;</span>Of Tipo<span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0600FF;">Private</span> <span style="color: #0600FF;">Sub</span> <span style="color: #0600FF;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Sub</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0600FF;">Private</span> <span style="color: #0600FF;">Shared</span> _instancia <span style="color: #0600FF;">As</span> Tipo</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0600FF;">Public</span> <span style="color: #0600FF;">Shared</span> <span style="color: #0600FF;">ReadOnly</span> <span style="color: #0600FF;">Property</span> Instancia<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #0600FF;">As</span> Tipo</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Get</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">If</span> _instancia <span style="color: #0600FF;">Is</span> <span style="color: #0600FF;">Nothing</span> <span style="color: #0600FF;">Then</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _instancia = <span style="color: #FF00FF;">CType</span><span style="color: #000000;">&#40;</span>Activator.<span style="color: #000000;">CreateInstance</span><span style="color: #000000;">&#40;</span><span style="color: #0600FF;">GetType</span><span style="color: #000000;">&#40;</span>Tipo<span style="color: #000000;">&#41;</span>, <span style="color: #0600FF;">True</span><span style="color: #000000;">&#41;</span>, Tipo<span style="color: #000000;">&#41;</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Return</span> _instancia</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Get</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Property</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Class</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>&nbsp;</p>
<p>La utilización de una clase "MiClase" que tuviera una propiedad llamada "PropiedadDeMiClase" y que hiciera uso de la clase genérica seria la siguiente:</p>
<p>&nbsp;</p>
<div class="igBar"><span id="lvbnet-8"><a href="#" onclick="maximizar('vbnet-8'); return false;">MAXIMIZAR</a> <a href="#" onclick="javascript:showPlainTxt('vbnet-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">VB.NET:</span><br />
<div id="vbnet-8">
<div class="vbnet">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ConfiguracionGenerica<span style="color: #000000;">&#40;</span>Of MiClase<span style="color: #000000;">&#41;</span>.<span style="color: #000000;">Instancia</span>.<span style="color: #000000;">PropiedadDeMiClase</span> = <span style="color: #A31515;">"¡Funciona!"</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.brausoft.com/2007/09/19/heredar-de-un-singleton/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Simulador de vuelo</title>
		<link>http://www.brausoft.com/2007/09/16/simulador-de-vuelo/</link>
		<comments>http://www.brausoft.com/2007/09/16/simulador-de-vuelo/#comments</comments>
		<pubDate>Sun, 16 Sep 2007 21:55:24 +0000</pubDate>
		<dc:creator>brausoft</dc:creator>
		
	<category>Otros Proyectos</category>
	<category>General</category>
		<guid isPermaLink="false">http://www.brausoft.com/2007/09/16/simulador-de-vuelo/</guid>
		<description><![CDATA[Como comente en un post anterior últimamente he estado realizando unas pruebas con la programación gráfica en 3D.
El resultado es un sencillo simulador de vuelo en el que manejas un avión. 
(Pulsad la imagen para verla a tamaño real)

Captura del simulador de vuelo.
La cámara puede moverse libremente por el mundo o fijarse a la parte [...]]]></description>
			<content:encoded><![CDATA[<p>Como comente en un <a href=/2007/09/04/primeros-pasos-en-3d/>post anterior</a> últimamente he estado realizando unas pruebas con la programación gráfica en 3D.</p>
<p>El resultado es un sencillo simulador de vuelo en el que manejas un avión. </p>
<div style="text-align: center">(Pulsad la imagen para verla a tamaño real)</div>
<div style="text-align: center"><a href="#"><img style="width:100%" title="Captura del simulador de vuelo." alt="Captura del simulador de vuelo." onclick="mostrarImagen(this); return false" src="/Ficheros/avion1.PNG" /></a></div>
<div style="text-align: center">Captura del simulador de vuelo.</div>
<p>La cámara puede moverse libremente por el mundo o fijarse a la parte delantera del avión o a su parte posterior.</p>
<p>En la parte inferior izquierda se visualiza el velocímetro analógico y la brújula que indica en que dirección te mueves. También se muestra un indicador de la altitud y de la inclinación con respecto al horizonte para saber si estamos ascendiendo o descendiendo y en que medida.<br />
En la esquina inferior derechas se encuentra un pequeño mapa a escala y un punto rojo parpadeante que nos indica en todo momento en donde estamos y que es muy útil para dirigirnos a nuestro destino.</p>
<p>Esta desarrollado en Visual Basic .NET con el Framework 2.0 y haciendo uso de las DirectX 9.</p>
<p>Los gráficos como se puede observar son extremadamente malos. </p>
<div style="text-align: center">(Pulsad la imagen para verla a tamaño real)</div>
<div style="text-align: center"><a href="#"><img style="width:100%" title="Captura del simulador de vuelo." alt="Captura del simulador de vuelo." onclick="mostrarImagen(this); return false" src="/Ficheros/avion2.PNG" /></a></div>
<div style="text-align: center">Captura del simulador de vuelo.</div>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.brausoft.com/2007/09/16/simulador-de-vuelo/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Plugin para el wordpress: Manejar las descargas</title>
		<link>http://www.brausoft.com/2007/09/11/plugin-para-el-wordpress-manejar-las-descargas/</link>
		<comments>http://www.brausoft.com/2007/09/11/plugin-para-el-wordpress-manejar-las-descargas/#comments</comments>
		<pubDate>Tue, 11 Sep 2007 21:55:13 +0000</pubDate>
		<dc:creator>brausoft</dc:creator>
		
	<category>General</category>
	<category>Blog</category>
		<guid isPermaLink="false">http://www.brausoft.com/2007/09/11/plugin-para-el-wordpress-manejar-las-descargas/</guid>
		<description><![CDATA[En el área de descargas tengo varios ficheros disponibles para descargar y tengo pensado ir subiendo nuevas descargas a corto plazo. Hasta ahora no tenía forma de saber el número de veces que se descargaban dichos archivos ni de llevar un control de cuando lo subía ni asociarles una descripción.
Un plugin bastante interesante que he [...]]]></description>
			<content:encoded><![CDATA[<p>En el área de <a href="/descargas/">descargas</a> tengo varios ficheros disponibles para descargar y tengo pensado ir subiendo nuevas descargas a corto plazo. Hasta ahora no tenía forma de saber el número de veces que se descargaban dichos archivos ni de llevar un control de cuando lo subía ni asociarles una descripción.</p>
<p>Un plugin bastante interesante que he encontrado para el wordpress es el download monitor, que puede encontrarse en la siguiente dirección:</p>
<p><a href="http://blue-anvil.com/archives/wordpress-download-monitor-plugin-v15">http://blue-anvil.com/archives/wordpress-download-monitor-plugin-v15</a></p>
<p>Con este plugin podremos realizar fácilmente la subida de ficheros a nuestro blog, tener todos los ficheros bien localizados y saber cuantas veces se descarga cada uno. También permite asociar una versión a cada fichero.</p>
<p>Tanto la instalación del plugin como su uso es muy sencillo.</p>
<p>La ruta por defecto a la que se subieran los ficheros es la siguiente /wp-content/plugins/wp-downloadMonitor/user_uploads/<br />
Probablemente deseemos modificar esta ruta indicando otra que nos parezca más adecuada, para ello debemos modificar el fichero wp-downloadMonitor.php. Dicha ruta aparece cableada en el código (Hard code) en 10 puntos de dicho fichero. Y en esos 10 puntos debemos modificarlo por la ruta que deseemos. No se si el desarrollador del plugin habrá tenido alguna razón para hacerlo así, pero lo razonable parece que hubiera sido meter ese valor en la base de datos y permitir modificarlo desde la pantalla de opciones o en el peor de los casos tenerlo una única vez en el código en vez de diez veces.</p>
<p>Además he tenido que modificar también los tipos de ficheros permitidos para subir y descargar, ya que inicialmente solo se permitían los .zip y los .pdf</p>
<p>Un plugin muy recomendable de incorporar a nuestro blog y con el que de momento no he tenido ningún problema.</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.brausoft.com/2007/09/11/plugin-para-el-wordpress-manejar-las-descargas/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Herramienta para obtener el color de un pixel de la pantalla.</title>
		<link>http://www.brausoft.com/2007/09/09/herramienta-para-obtener-el-color-de-un-pixel-de-la-pantalla/</link>
		<comments>http://www.brausoft.com/2007/09/09/herramienta-para-obtener-el-color-de-un-pixel-de-la-pantalla/#comments</comments>
		<pubDate>Sun, 09 Sep 2007 21:56:48 +0000</pubDate>
		<dc:creator>brausoft</dc:creator>
		
	<category>Otros Proyectos</category>
	<category>General</category>
		<guid isPermaLink="false">http://www.brausoft.com/2007/09/09/herramienta-para-obtener-el-color-de-un-pixel-de-la-pantalla/</guid>
		<description><![CDATA[Esta sencilla herramienta la desarrollé hace algo más de dos años y permite conocer el color de un determinado pixel de la pantalla. Dicho color es expresado por sus componentes ARGB tanto en hexadecimal  como en decimal.
Esta herramienta puede ser útil si por ejemplo queremos poner un control de una pagina html o de [...]]]></description>
			<content:encoded><![CDATA[<p>Esta sencilla herramienta la desarrollé hace algo más de dos años y permite conocer el color de un determinado pixel de la pantalla. Dicho color es expresado por sus componentes ARGB tanto en hexadecimal  como en decimal.<br />
Esta herramienta puede ser útil si por ejemplo queremos poner un control de una pagina html o de una aplicación windows de un determinado color (que aparezca en otra pagina web o en una imagen) y no sabemos su representación para reproducirlo.</p>
<p>Su funcionamiento es muy sencillo. Tiene dos modos, capturar y no capturar. En el modo capturar se obtendrá el color del pixel sobre el cual posicionemos el ratón. Para cambiar de modo se debe pulsar la tecla "Espacio". También se puede pulsar con el ratón sobre el check de capturar, pero entonces se modificará el color obtenido ya que cambiamos de posición el ratón.</p>
<p>Esta desarrollada en Visual Basic.NET haciendo uso del Framework 1.1. Para implementarlo hice uso del API de windows.</p>
<p>En la <a href="/descargas">sección de descargas</a> podréis obtener tanto el código fuente como los binarios de al aplicación.</p>
<p>Este es el aspecto que tiene la herramienta:</p>
<div style="text-align: center"><a href="#"><img title="Herramienta Color." alt="Herramienta Color." onclick="mostrarImagen(this); return false" src="/Ficheros/color.PNG" /></a></div>
<div style="text-align: center">Herramienta Color.</div>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.brausoft.com/2007/09/09/herramienta-para-obtener-el-color-de-un-pixel-de-la-pantalla/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Primeros pasos en 3D</title>
		<link>http://www.brausoft.com/2007/09/04/primeros-pasos-en-3d/</link>
		<comments>http://www.brausoft.com/2007/09/04/primeros-pasos-en-3d/#comments</comments>
		<pubDate>Tue, 04 Sep 2007 21:59:35 +0000</pubDate>
		<dc:creator>brausoft</dc:creator>
		
	<category>Otros Proyectos</category>
		<guid isPermaLink="false">http://www.brausoft.com/2007/09/04/primeros-pasos-en-3d/</guid>
		<description><![CDATA[Hasta el momento no había realizado ninguna incursión en el mundillo de las 3D con DirectX. Recientemente me ha picado el gusanillo y me he puesto a realizar un pequeño experimento en 3D. La idea es crear una especie de simulador de vuelo muy básico ya que no pretendo crear un juego decente sino simplemente [...]]]></description>
			<content:encoded><![CDATA[<p>Hasta el momento no había realizado ninguna incursión en el mundillo de las 3D con DirectX. Recientemente me ha picado el gusanillo y me he puesto a realizar un pequeño experimento en 3D. La idea es crear una especie de simulador de vuelo muy básico ya que no pretendo crear un juego decente sino simplemente aprender algo sobre la programación en 3D. </p>
<p>Por lo tanto de momento voy a aparcar el desarrollo de la aventura gráfica y me voy a centrar en este sencillo juego.</p>
<p>Según vaya realizando avances colocaré algunas capturas.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.brausoft.com/2007/09/04/primeros-pasos-en-3d/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Punto contenido dentro de un póligono</title>
		<link>http://www.brausoft.com/2007/09/03/punto-contenido-dentro-de-un-poligono/</link>
		<comments>http://www.brausoft.com/2007/09/03/punto-contenido-dentro-de-un-poligono/#comments</comments>
		<pubDate>Mon, 03 Sep 2007 21:59:09 +0000</pubDate>
		<dc:creator>brausoft</dc:creator>
		
	<category>Motor Aventura Gráfica</category>
	<category>Artículos</category>
		<guid isPermaLink="false">http://www.brausoft.com/2007/09/03/punto-contenido-dentro-de-un-poligono/</guid>
		<description><![CDATA[Una necesidad muy común en el desarrollo de videojuegos es la de determinar si un punto esta contenido dentro de un polígono irregular. Por ejemplo en el caso de una aventura gráfica es necesario para averiguar si el usuario ha pulsado sobre una determinada región que podría ser un objeto, otro personaje, etc.
Dentro de la [...]]]></description>
			<content:encoded><![CDATA[<p>Una necesidad muy común en el desarrollo de videojuegos es la de determinar si un punto esta contenido dentro de un polígono irregular. Por ejemplo en el caso de una aventura gráfica es necesario para averiguar si el usuario ha pulsado sobre una determinada región que podría ser un objeto, otro personaje, etc.</p>
<p>Dentro de la librería matemática que he creado se encuentra la clase polígono que implementa dicha funcionalidad. Así como una serie de clases que también son utilizadas en el algoritmo como la clases Vector o la clase Angulo</p>
<p>El algoritmo para determinar si el punto esta incluido dentro del área del polígono es bastante sencillo, pero requiere algunos cálculos.</p>
<p>Inicialmente se une el punto que se quiere averiguar si esta dentro o fuera del polígono con cada uno de los vértices del polígono, con lo cual se obtendrán tantos segmentos como vértices tenga el polígono.<br />
Después hay que ir sumando los ángulos que forman esos segmentos. La suma hay que realizarla en orden, es decir primero sumar el ángulo que forma el segmento del punto al vertice1 con el segmento del punto al vertice2 con el ángulo que forma el segmento del punto al vertice2 con el segmento del punto al vertice3. Y así sucesivamente en orden hasta terminar sumando el ángulo que forma el segmento del último vértice con el del primer vértice.<br />
Si el ángulo total resultante de la suma de ángulos es 0 grados entonces el punto estará fuera del polígono, si es 2PI entonces estará dentro.<br />
Al realizar los cálculos probablemente se acumulen errores de redondeo así que a lo mejor el resultado no es exactamente 0 o 2 PI, por lo que  no  se debe comparar con 0 o 2PI si no ver si esta cerca de esos valores.</p>
<p>El código del método que determina si el punto pertenece al polígono es el siguiente:</p>
<p>&nbsp;</p>
<div class="igBar"><span id="lvbnet-12"><a href="#" onclick="maximizar('vbnet-12'); return false;">MAXIMIZAR</a> <a href="#" onclick="javascript:showPlainTxt('vbnet-12'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">VB.NET:</span><br />
<div id="vbnet-12">
<div class="vbnet">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #008000; font-style: italic;">''' &lt;summary&gt;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' Devuelve si el punto pertenece al poligono</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' &lt;/summary&gt;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' &lt;param name=&quot;pPunto&quot;&gt;&lt;/param&gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' &lt;returns&gt;&lt;/returns&gt;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' &lt;remarks&gt;&lt;/remarks&gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0600FF;">Public</span> <span style="color: #0600FF;">Function</span> Incluye<span style="color: #000000;">&#40;</span><span style="color: #0600FF;">ByVal</span> pPunto <span style="color: #0600FF;">As</span> Point<span style="color: #000000;">&#41;</span> <span style="color: #0600FF;">As</span> <span style="color: #0600FF;">Boolean</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Dim</span> a <span style="color: #0600FF;">As</span> <span style="color: #0600FF;">New</span> Angulo<span style="color: #000000;">&#40;</span><span style="color: #A31515;color:#800000;">0</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Dim</span> v1 <span style="color: #0600FF;">As</span> Vector</div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Dim</span> v2 <span style="color: #0600FF;">As</span> Vector</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Dim</span> i <span style="color: #0600FF;">As</span> <span style="color: #0600FF;">Integer</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">If</span> Vertices.<span style="color: #000000;">Count</span> &lt;<span style="color: #A31515;color:#800000;">3</span> <span style="color: #0600FF;">Then</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Throw</span> <span style="color: #0600FF;">New</span> ApplicationException<span style="color: #000000;">&#40;</span><span style="color: #A31515;">"El polígono debe tener al menos tres vértices y tiene "</span> &amp; Vertices.<span style="color: #000000;">Count</span> &amp; <span style="color: #A31515;">" vertices."</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-style: italic;">'Trazamos un vector desde el punto a cada uno de los </span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-style: italic;">'vertices</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-style: italic;">'Calculamos el angulo que forma cada vector con el</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-style: italic;">'vector del vertice adyacente (el vector del ultimo</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-style: italic;">'vertice formará un angulo con el vector primer vertice)</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-style: italic;">'Sumamos todos los angulo</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">For</span> i = <span style="color: #A31515;color:#800000;">0</span> <span style="color: #0600FF;">To</span> Vertices.<span style="color: #000000;">Count</span> - <span style="color: #A31515;color:#800000;">1</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; v1 = <span style="color: #0600FF;">New</span> Vector<span style="color: #000000;">&#40;</span>pPunto, Vertices<span style="color: #000000;">&#40;</span>i<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; v2 = <span style="color: #0600FF;">New</span> Vector<span style="color: #000000;">&#40;</span>pPunto, Vertices<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>i + <span style="color: #A31515;color:#800000;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #0600FF;">Mod</span> Vertices.<span style="color: #000000;">Count</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; a = a + Vector.<span style="color: #000000;">Angulo</span><span style="color: #000000;">&#40;</span>v1, v2<span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Next</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-style: italic;">'Si el angulo resultante es 360º entones el punto estará </span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-style: italic;">'dentro del poligono</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-style: italic;">'Si el angulo es 0 grados estará fuera.</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-style: italic;">'Como se han podido acumular pequeños errores al hacer</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-style: italic;">'los calculos establecemos que si el valor absoluto</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-style: italic;">'de los grados es menor de 180 esta fuera (realmente </span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-style: italic;">'será cercano a 0º) y si no dentro (estará cercano a 360)</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Return</span> Math.<span style="color: #FF00FF;">Abs</span><span style="color: #000000;">&#40;</span>a.<span style="color: #000000;">Grados</span><span style="color: #000000;">&#41;</span>&gt; <span style="color: #A31515;color:#800000;">180</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Function</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>&nbsp;</p>
<p>El polígono viene dado por una lista de puntos que representan los vértices.</p>
<p>Para determinar el ángulo entre dos vectores utilizamos la siguiente función:</p>
<p>&nbsp;</p>
<div class="igBar"><span id="lvbnet-13"><a href="#" onclick="maximizar('vbnet-13'); return false;">MAXIMIZAR</a> <a href="#" onclick="javascript:showPlainTxt('vbnet-13'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">VB.NET:</span><br />
<div id="vbnet-13">
<div class="vbnet">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #008000; font-style: italic;">''' &lt;summary&gt;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' Devuelve el angulo que forman los dos vectores expresado en radianes</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' &lt;/summary&gt;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' &lt;param name=&quot;v1&quot;&gt;&lt;/param&gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' &lt;param name=&quot;v2&quot;&gt;&lt;/param&gt;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' &lt;returns&gt;El angulo expresado en radianes&lt;/returns&gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' &lt;remarks&gt;&lt;/remarks&gt;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0600FF;">Public</span> <span style="color: #0600FF;">Shared</span> <span style="color: #0600FF;">Function</span> Angulo<span style="color: #000000;">&#40;</span><span style="color: #0600FF;">ByVal</span> v1 <span style="color: #0600FF;">As</span> Vector, <span style="color: #0600FF;">ByVal</span> v2 <span style="color: #0600FF;">As</span> Vector<span style="color: #000000;">&#41;</span> <span style="color: #0600FF;">As</span> Angulo</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">If</span> Vector.<span style="color: #000000;">ModuloDelProductoVectorialConSigno</span><span style="color: #000000;">&#40;</span>v1, v2<span style="color: #000000;">&#41;</span>&gt; <span style="color: #A31515;color:#800000;">0</span> <span style="color: #0600FF;">Then</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Return</span> <span style="color: #0600FF;">New</span> Angulo<span style="color: #000000;">&#40;</span>Math.<span style="color: #000000;">Acos</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>Vector.<span style="color: #000000;">ProductoEscalar</span><span style="color: #000000;">&#40;</span>v1, v2<span style="color: #000000;">&#41;</span> / <span style="color: #000000;">&#40;</span>v1.<span style="color: #000000;">Modulo</span> * v2.<span style="color: #000000;">Modulo</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Else</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-style: italic;">'Si el modulo del producto vectorial es negativo</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-style: italic;">'el angulo será negativo</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Return</span> <span style="color: #0600FF;">New</span> Angulo<span style="color: #000000;">&#40;</span>-<span style="color: #A31515;color:#800000;">1</span> * Math.<span style="color: #000000;">Acos</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>Vector.<span style="color: #000000;">ProductoEscalar</span><span style="color: #000000;">&#40;</span>v1, v2<span style="color: #000000;">&#41;</span> / <span style="color: #000000;">&#40;</span>v1.<span style="color: #000000;">Modulo</span> * v2.<span style="color: #000000;">Modulo</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Function</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>&nbsp;</p>
<p>El cálculo del producto escalar de dos vectores y del módulo del producto vectorial es muy sencillo:</p>
<p>&nbsp;</p>
<div class="igBar"><span id="lvbnet-14"><a href="#" onclick="maximizar('vbnet-14'); return false;">MAXIMIZAR</a> <a href="#" onclick="javascript:showPlainTxt('vbnet-14'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">VB.NET:</span><br />
<div id="vbnet-14">
<div class="vbnet">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #008000; font-style: italic;">''' &lt;summary&gt;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' Devuelve el producto escalar de dos vectores</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' &lt;/summary&gt;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' &lt;param name=&quot;v1&quot;&gt;&lt;/param&gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' &lt;param name=&quot;v2&quot;&gt;&lt;/param&gt;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' &lt;returns&gt;&lt;/returns&gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' &lt;remarks&gt;&lt;/remarks&gt;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0600FF;">Public</span> <span style="color: #0600FF;">Shared</span> <span style="color: #0600FF;">Function</span> ProductoEscalar<span style="color: #000000;">&#40;</span><span style="color: #0600FF;">ByVal</span> v1 <span style="color: #0600FF;">As</span> Vector, <span style="color: #0600FF;">ByVal</span> v2 <span style="color: #0600FF;">As</span> Vector<span style="color: #000000;">&#41;</span> <span style="color: #0600FF;">As</span> <span style="color: #0600FF;">Integer</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Return</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>v1.<span style="color: #000000;">X</span> * v2.<span style="color: #000000;">X</span><span style="color: #000000;">&#41;</span> + <span style="color: #000000;">&#40;</span>v1.<span style="color: #000000;">Y</span> * v2.<span style="color: #000000;">Y</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Function</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' &lt;summary&gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' Devuelve el módulo del vector resultante de hacer el</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' productor vectorial de dos vectores</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' &lt;/summary&gt;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' &lt;param name=&quot;v1&quot;&gt;&lt;/param&gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' &lt;param name=&quot;v2&quot;&gt;&lt;/param&gt;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' &lt;returns&gt;&lt;/returns&gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #008000; font-style: italic;">''' &lt;remarks&gt;&lt;/remarks&gt;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0600FF;">Public</span> <span style="color: #0600FF;">Shared</span> <span style="color: #0600FF;">Function</span> ModuloDelProductoVectorialConSigno<span style="color: #000000;">&#40;</span><span style="color: #0600FF;">ByVal</span> v1 <span style="color: #0600FF;">As</span> Vector, <span style="color: #0600FF;">ByVal</span> v2 <span style="color: #0600FF;">As</span> Vector<span style="color: #000000;">&#41;</span> <span style="color: #0600FF;">As</span> <span style="color: #0600FF;">Integer</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">Return</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>v1.<span style="color: #000000;">X</span> * v2.<span style="color: #000000;">Y</span><span style="color: #000000;">&#41;</span> - <span style="color: #000000;">&#40;</span>v1.<span style="color: #000000;">Y</span> * v2.<span style="color: #000000;">X</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#000000;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Function</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.brausoft.com/2007/09/03/punto-contenido-dentro-de-un-poligono/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Estado del proyecto a 31/07/2007</title>
		<link>http://www.brausoft.com/2007/07/31/estado-del-proyecto-a-31072007/</link>
		<comments>http://www.brausoft.com/2007/07/31/estado-del-proyecto-a-31072007/#comments</comments>
		<pubDate>Tue, 31 Jul 2007 21:43:41 +0000</pubDate>
		<dc:creator>brausoft</dc:creator>
		
	<category>Motor Aventura Gráfica</category>
		<guid isPermaLink="false">http://www.brausoft.com/2007/07/31/estado-del-proyecto-a-31072007/</guid>
		<description><![CDATA[Esta última quincena me ha cundido bastante y le he dado un pequeño empujón al proyecto. 
He añadido al editor de scripts la posibilidad de mostrar los números de línea del código, funcionalidad en desuso hoy en día y que era muy común en los viejos editores de código. El visual studio 2005 permite mostrarlos [...]]]></description>
			<content:encoded><![CDATA[<p>Esta última quincena me ha cundido bastante y le he dado un pequeño empujón al proyecto. </p>
<p>He añadido al editor de scripts la posibilidad de mostrar los números de línea del código, funcionalidad en desuso hoy en día y que era muy común en los viejos editores de código. El visual studio 2005 permite mostrarlos aunque por defecto esta deshabilitado.</p>
<p>También he añadido al editor de scripts una ventana de opciones para configurar varios aspectos del editor. Actualmente permite establecer la fuente del editor de código, si se mostrarán los números de línea o no y si se sustituirán los tabuladores por espacios  y si es así por cuantos espacios.</p>
<p>He creado un control llamado animación que encapsula toda la funcionalidad relativa a la creación de una animación para poder reutilizarlo con facilidad en los diversos editores. Actualmente solo está presente en el editor del personaje protagonista.</p>
<p>En cuanto a la ejecución de la aventura gráfica también he realizado algunos avances. El motor lee la información creada previamente con las herramientas o editores y dibuja el escenario inicial y el protagonista. Este se mueve por la pantalla respondiendo a las pulsaciones del teclado o yendo hacia el punto donde se haya hecho click con el ratón. El protagonista se mueve a la velocidad indicada en el editor del protagonista y camina en 8 posibles direcciones con las animaciones (secuencias de fotogramas) que se hayan definido.</p>
<p>Tambien he desarrollado una clase para dar soporte a la configuración de la aplicación, permitiendo varios ficheros de configuración y la actualización "en caliente", es decir que si en tiempo de ejecución se modifica algún valor de un fichero de configuración dicho cambio es detectado y aplicado por la aplicación sin tener que reiniciarla.</p>
<p>Para pertimir moverse al protagonista de una forma coherente por las zonas transitables de los escenarios he implementado un algoritmo de búsqueda de caminos basándome en el A*. No está del todo terminado, ya que todavía tengo pendiente pulir un poco los caminos encontrados por el algoritmo de búsqueda..</p>
<p>Aun quedan pendientes muchas modificaciones a los editores y la creación de editores nuevos como el editor de objetos o el de conversaciones.</p>
<p>Más adelante iré subiendo algunas capturas de todo esto.</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.brausoft.com/2007/07/31/estado-del-proyecto-a-31072007/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Descarga añadida: Control Borde</title>
		<link>http://www.brausoft.com/2007/07/30/descarga-anadida-control-borde/</link>
		<comments>http://www.brausoft.com/2007/07/30/descarga-anadida-control-borde/#comments</comments>
		<pubDate>Mon, 30 Jul 2007 21:39:59 +0000</pubDate>
		<dc:creator>brausoft</dc:creator>
		
	<category>General</category>
		<guid isPermaLink="false">http://www.brausoft.com/2007/07/30/descarga-anadida-control-borde/</guid>
		<description><![CDATA[He añadido en la sección de descargas el código completo del control borde del que hablé en un post anterior y que permite dotar a los controles de .NET de varios estilos de borde adicionales a los que vienen por defecto.
]]></description>
			<content:encoded><![CDATA[<p>He añadido en la sección de <a href="/descargas/">descargas</a> el código completo del control borde del que hablé en un <a href="/2007/07/18/dotando-a-los-controles-de-net-de-un-borde-personalizado/">post anterior</a> y que permite dotar a los controles de .NET de varios estilos de borde adicionales a los que vienen por defecto.</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.brausoft.com/2007/07/30/descarga-anadida-control-borde/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Primer aniversario</title>
		<link>http://www.brausoft.com/2007/07/29/primer-aniversario/</link>
		<comments>http://www.brausoft.com/2007/07/29/primer-aniversario/#comments</comments>
		<pubDate>Sun, 29 Jul 2007 21:54:44 +0000</pubDate>
		<dc:creator>brausoft</dc:creator>
		
	<category>General</category>
	<category>Blog</category>
		<guid isPermaLink="false">http://www.brausoft.com/2007/07/29/primer-aniversario/</guid>
		<description><![CDATA[Hoy se cumple el primer aniversario del nacimiento de este blog. 
En estos 365 días he publicado 44 posts, a una media de un post cada ocho días y se han recibido 95 comentarios. El número de mensajes de spam recibidos asciende a más de 7000.
El número de visitas únicas ha sido de 9.808, que [...]]]></description>
			<content:encoded><![CDATA[<p>Hoy se cumple el primer aniversario del nacimiento de este blog. </p>
<p>En estos 365 días he publicado 44 posts, a una media de un post cada ocho días y se han recibido 95 comentarios. El número de mensajes de spam recibidos asciende a más de 7000.<br />
El número de visitas únicas ha sido de 9.808, que han visto 17.468 páginas. Muchos de ellos han sido gente despistada que ha llegado a través de google buscando otras cosas.</p>
<p>En cuanto al proyecto, no ha avanzado todo lo que hubiera querido debido a la falta de tiempo, aunque poco a poco va avanzando y ya hay algunas cosas visibles que espero mostrar en breve.</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.brausoft.com/2007/07/29/primer-aniversario/feed/</wfw:commentRSS>
		</item>
	</channel>
</rss>
