Name refactoring
This commit is contained in:
@@ -28,7 +28,7 @@ namespace QuestPDF.Examples.Engine
|
||||
{
|
||||
return new DocumentSettings()
|
||||
{
|
||||
RasterDpi = PageSizes.PointsPerInch * ImageScalingFactor
|
||||
ImageRasterDpi = PageSizes.PointsPerInch * ImageScalingFactor
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -234,13 +234,13 @@ namespace QuestPDF.Drawing
|
||||
{
|
||||
if (x is QuestPDF.Elements.Image image)
|
||||
{
|
||||
image.TargetDpi ??= settings.RasterDpi;
|
||||
image.TargetDpi ??= settings.ImageRasterDpi;
|
||||
image.CompressionQuality ??= settings.ImageCompressionQuality;
|
||||
}
|
||||
|
||||
if (x is QuestPDF.Elements.DynamicImage dynamicImage)
|
||||
{
|
||||
dynamicImage.TargetDpi ??= settings.RasterDpi;
|
||||
dynamicImage.TargetDpi ??= settings.ImageRasterDpi;
|
||||
dynamicImage.CompressionQuality ??= settings.ImageCompressionQuality;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace QuestPDF.Drawing
|
||||
|
||||
public override void BeginPage(Size size)
|
||||
{
|
||||
var scalingFactor = Settings.RasterDpi / (float) PageSizes.PointsPerInch;
|
||||
var scalingFactor = Settings.ImageRasterDpi / (float) PageSizes.PointsPerInch;
|
||||
var imageInfo = new SKImageInfo((int) (size.Width * scalingFactor), (int) (size.Height * scalingFactor));
|
||||
|
||||
Surface = SKSurface.Create(imageInfo);
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace QuestPDF.Drawing
|
||||
Creation = metadata.CreationDate,
|
||||
Modified = metadata.ModifiedDate,
|
||||
|
||||
RasterDpi = documentSettings.RasterDpi,
|
||||
RasterDpi = documentSettings.ImageRasterDpi,
|
||||
EncodingQuality = documentSettings.ImageCompressionQuality.ToQualityValue(),
|
||||
PdfA = documentSettings.PdfA
|
||||
};
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace QuestPDF.Drawing
|
||||
{
|
||||
try
|
||||
{
|
||||
return SKDocument.CreateXps(stream, documentSettings.RasterDpi);
|
||||
return SKDocument.CreateXps(stream, documentSettings.ImageRasterDpi);
|
||||
}
|
||||
catch (TypeInitializationException exception)
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
/// When generating images, this parameter also controls the resolution of the generated content.
|
||||
/// Default value is 144.
|
||||
/// </summary>
|
||||
public int RasterDpi { get; set; } = DefaultRasterDpi * 2;
|
||||
public int ImageRasterDpi { get; set; } = DefaultRasterDpi * 2;
|
||||
|
||||
public ContentDirection ContentDirection { get; set; } = ContentDirection.LeftToRight;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user