The following example shows the effect that this parameter has
on PDF rendering.
using (Doc doc = new Doc()) {
// Add a polygon
doc.Color.String = "255 0 0";
doc.AddPoly("32 650 50 704 68 650 22 683 79 683 32 650", true);
doc.Rect.String = "20 650 80 704";
// Render the drawn area with AntiAliasPolygons (default)
Bitmap antiAliasedBitmap = doc.Rendering.GetBitmap();
// Render the drawn area without AntiAliasPolygons
doc.Rendering.AntiAliasPolygons = false;
Bitmap aliasedBitmap = doc.Rendering.GetBitmap();
// Add magnified aliased image
doc.Rect.String = "5 20 605 560";
doc.AddImageBitmap(aliasedBitmap, false);
// Anotate
doc.Color.String = "black";
doc.FontSize = 30;
doc.Pos.String = "20 750";
doc.AddText("Original path:");
doc.Pos.String = "20 620";
doc.AddText("Magnified rendered image:");
// Render the document with aliased image
doc.Rendering.DotsPerInch = 36;
doc.Rect.String = doc.MediaBox.String;
doc.Rendering.Save(Server.MapPath("RenderingAntiAliasPolygonsFalse.png"));
// Add magnified antialiased image
doc.Rect.String = "5 20 605 560";
doc.AddImageBitmap(antiAliasedBitmap, false);
// Render the document with antialiased image
doc.Rendering.DotsPerInch = 36;
doc.Rect.String = doc.MediaBox.String;
doc.Rendering.Save(Server.MapPath("RenderingAntiAliasPolygonsTrue.png"));
}
using (Doc doc = new Doc()) {
// Add a polygon
doc.Color.String = "255 0 0";
doc.AddPoly("32 650 50 704 68 650 22 683 79 683 32 650", true);
doc.Rect.String = "20 650 80 704";
// Render the drawn area with AntiAliasPolygons (default)
Bitmap antiAliasedBitmap = doc.Rendering.GetBitmap();
// Render the drawn area without AntiAliasPolygons
doc.Rendering.AntiAliasPolygons = false;
Bitmap aliasedBitmap = doc.Rendering.GetBitmap();
// Add magnified aliased image
doc.Rect.String = "5 20 605 560";
doc.AddImageBitmap(aliasedBitmap, false);
// Anotate
doc.Color.String = "black";
doc.FontSize = 30;
doc.Pos.String = "20 750";
doc.AddText("Original path:");
doc.Pos.String = "20 620";
doc.AddText("Magnified rendered image:");
// Render the document with aliased image
doc.Rendering.DotsPerInch = 36;
doc.Rect.String = doc.MediaBox.String;
doc.Rendering.Save(Server.MapPath("RenderingAntiAliasPolygonsFalse.png"));
// Add magnified antialiased image
doc.Rect.String = "5 20 605 560";
doc.AddImageBitmap(antiAliasedBitmap, false);
// Render the document with antialiased image
doc.Rendering.DotsPerInch = 36;
doc.Rect.String = doc.MediaBox.String;
doc.Rendering.Save(Server.MapPath("RenderingAntiAliasPolygonsTrue.png"));
}