@ -58,16 +58,16 @@ namespace DeathSocket
// NOT T E S T E D
/// < s u m m a r y >
/// Takes an image and determines the current scale it is viewed a t
/// (E.G. scaled preview in image viewer). The (pen) line thickness i s
/// then updated t o match this preview scale and can be used w h e n
/// drawing a grid line on the scaled preview of the i m a g e .
/// Determines the current scale an image is viewed at (E.G. s c a l e d
/// preview in image viewer). The (pen) line thickness is then u p d a t e d
/// to match this preview scale and can be used when drawing a g r i d
/// line on the scaled preview of the i m a g e .
/// < / s u m m a r y >
/// <param n a m e = " p r e v i e w W i d t h " >
/// The width of the image when previewed (I.E. in a G U I ) .
/// <param n a m e = " p r e v i e w D i m e n s i o n " >
/// The width or height o f the image when previewed (I.E. in a G U I ) .
/// < / p a r a m >
/// <param n a m e = " a c t u a l W i d t h " >
/// The width of the actual i m a g e .
/// <param n a m e = " a c t u a l D i m e n s i o n " >
/// The width or height o f the actual i m a g e .
/// < / p a r a m >
/// <param n a m e = " l i n e T h i c k n e s s " >
/// The thickness of the pen used to draw the grid l i n e .
@ -78,8 +78,18 @@ namespace DeathSocket
/// SkiaSharp based functions already scale the grid lines for you. S o ,
/// you should not need to use this function when using t h e m .
/// < / r e m a r k s >
let scaleLineThickness (previewWidth: double) (actualWidth: double) (lineThickness: double) =
lineThickness / (previewWidth / a c t u a l W i d t h )
let scaleLineThickness (previewDimension: double) (actualDimension: double) (lineThickness: double) =
lineThickness / (previewDimension / a c t u a l D i m e n s i o n )
// NOT T E S T E D .
let determineDimension imageType =
match imageType w i t h
| SkiaSharp s - >
validateIO s |> i g n o r e
determineSkiaDimensions s
| SystemDrawing d - >
validateIO d |> i g n o r e
determineSystemDrawingDimensions d
// System.Drawing F u n c t i o n s
// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =