public Brush CrearBrocha(SWPEditor.IU.Graficos.Brocha brocha) { SolidColorBrush b = new SolidColorBrush(CrearColor(((SWPEditor.IU.Graficos.BrochaSolida)brocha).Color)); b.Freeze(); return(b); }
public void RellenarRectangulo(SWPEditor.IU.Graficos.Brocha brocha, SWPEditor.IU.PresentacionDocumento.Punto inicio, SWPEditor.Dominio.TamBloque bloque) { contexto.DrawRectangle(CrearBrocha(brocha), null, new Rect(CrearPunto(inicio), CrearTam(bloque))); }
public void DibujarTexto(SWPEditor.IU.PresentacionDocumento.Punto posicion, SWPEditor.IU.Graficos.Letra letra, SWPEditor.IU.Graficos.Brocha brocha, string texto) { Typeface t = new Typeface(new FontFamily(letra.Familia), new FontStyle(), new FontWeight(), new FontStretch()); FormattedText f = new FormattedText(texto, System.Globalization.CultureInfo.InvariantCulture, FlowDirection.LeftToRight, t, ObtenerMedida(letra.Tamaño), CrearBrocha(brocha)); contexto.DrawText(f, CrearPunto(posicion)); }