Click here to Skip to main content
15,907,395 members
Home / Discussions / WPF
   

WPF

 
QuestionDrawing Geometries to RenderTargetBitmap is being anti-aliased, can it be turned off ? Pin
sfogarasi16-Oct-09 4:49
sfogarasi16-Oct-09 4:49 
I just had a surprise from WPF in that the drawing functions are anti-aliasing (or something similar) my drawing.
Im not doing naything fancy :

....
RenderTargetBitmap renderBitmap = new RenderTargetBitmap (
PixelWidth,
PixelHeight,
DpiX,
DpiY,
PixelFormats.Pbgra32 );

foreach ( DrawingVisual aVisual in visuals )
{
//blah blah, get dc for each visual in my list, draw geomtry to visual
...
renderBitmap.Render ( aVisual );
...
}

Image img = new Image ( );
img.Source = renderBitmap;

///blah blah encode and save stream to file


all the geometries are simple pens of single color, but the final image has been antialiased, edge colors 'smoothed'.

As this is is an imaging app where every pixel value must be specific, I cant tolerate any kind of 'smart' smoothing.

What am I doing wrong wrong ? How can I guarantee that ONLY those colours that I specify will be displayed ? There must be someway to turn off this ant-aliasing.

thanks for your help, any suggestions or alternative would be appreciated.
QuestionRe: Drawing Geometries to RenderTargetBitmap is being anti-aliased, can it be turned off ? Pin
Mark Salsbery16-Oct-09 7:50
Mark Salsbery16-Oct-09 7:50 
AnswerRe: Drawing Geometries to RenderTargetBitmap is being anti-aliased, can it be turned off ? Pin
sfogarasi16-Oct-09 8:42
sfogarasi16-Oct-09 8:42 
QuestionHow to save files in single DAT file in .NET? Pin
mittalpa15-Oct-09 6:58
mittalpa15-Oct-09 6:58 
AnswerRe: How to save files in single DAT file in .NET? Pin
Mark Salsbery15-Oct-09 7:50
Mark Salsbery15-Oct-09 7:50 
QuestionCan't get UriKind.Relative to work Pin
fjparisIII15-Oct-09 5:41
fjparisIII15-Oct-09 5:41 
AnswerRe: Can't get UriKind.Relative to work Pin
Mark Salsbery15-Oct-09 7:06
Mark Salsbery15-Oct-09 7:06 
GeneralRe: Can't get UriKind.Relative to work Pin
fjparisIII15-Oct-09 8:13
fjparisIII15-Oct-09 8:13 
GeneralRe: Can't get UriKind.Relative to work Pin
Mark Salsbery15-Oct-09 8:17
Mark Salsbery15-Oct-09 8:17 
GeneralRe: Can't get UriKind.Relative to work Pin
fjparisIII15-Oct-09 9:14
fjparisIII15-Oct-09 9:14 
General[Message Deleted] Pin
fjparisIII15-Oct-09 11:42
fjparisIII15-Oct-09 11:42 
QuestionRe: Can't get UriKind.Relative to work Pin
Mark Salsbery16-Oct-09 7:34
Mark Salsbery16-Oct-09 7:34 
AnswerRe: Can't get UriKind.Relative to work Pin
fjparisIII16-Oct-09 8:43
fjparisIII16-Oct-09 8:43 
GeneralRe: Can't get UriKind.Relative to work Pin
fjparisIII16-Oct-09 8:05
fjparisIII16-Oct-09 8:05 
GeneralRe: Can't get UriKind.Relative to work Pin
Mark Salsbery16-Oct-09 8:53
Mark Salsbery16-Oct-09 8:53 
GeneralRe: Can't get UriKind.Relative to work SOLVED! Pin
fjparisIII16-Oct-09 14:33
fjparisIII16-Oct-09 14:33 
GeneralRe: Can't get UriKind.Relative to work SOLVED! Pin
Mark Salsbery16-Oct-09 14:46
Mark Salsbery16-Oct-09 14:46 
GeneralRe: Can't get UriKind.Relative to work SOLVED! Pin
fjparisIII16-Oct-09 15:38
fjparisIII16-Oct-09 15:38 
QuestionNothing displayed when set a line to DashStyles.Dot Pin
CooperWu15-Oct-09 4:58
CooperWu15-Oct-09 4:58 
AnswerRe: Nothing displayed when set a line to DashStyles.Dot Pin
Mark Salsbery15-Oct-09 8:04
Mark Salsbery15-Oct-09 8:04 
QuestionControl Limitation Pin
Saiyed Alam14-Oct-09 18:39
Saiyed Alam14-Oct-09 18:39 
AnswerRe: Control Limitation Pin
Ian Shlasko15-Oct-09 3:47
Ian Shlasko15-Oct-09 3:47 
QuestionMenuItems not showing properly Pin
Shelby Robertson 14-Oct-09 4:56
Shelby Robertson 14-Oct-09 4:56 
AnswerRe: MenuItems not showing properly Pin
Mark Salsbery14-Oct-09 7:51
Mark Salsbery14-Oct-09 7:51 
GeneralRe: MenuItems not showing properly Pin
Shelby Robertson 14-Oct-09 8:00
Shelby Robertson 14-Oct-09 8:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.