Some text and eximageinfo correctness update.

This commit is contained in:
soukoku
2014-05-23 18:41:18 -04:00
parent 3b31c465e6
commit b0142127d7
12 changed files with 155 additions and 61 deletions

View File

@@ -6,16 +6,20 @@ namespace NTwain.Triplets
/// <summary>
/// Represents <see cref="DataArgumentType.ExtImageInfo"/>.
/// </summary>
public sealed class ExtImageInfo : OpBase
{
internal ExtImageInfo(ITwainSessionInternal session) : base(session) { }
public sealed class ExtImageInfo : OpBase
{
internal ExtImageInfo(ITwainSessionInternal session) : base(session) { }
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
public ReturnCode Get(out TWExtImageInfo info)
{
Session.VerifyState(7, 7, DataGroups.Image, DataArgumentType.ExtImageInfo, Message.Get);
info = new TWExtImageInfo();
/// <summary>
/// This operation is used by the application to query the data source for extended image attributes.
/// The application is responsible for creating and disiposing the info object.
/// </summary>
/// <param name="info">The information.</param>
/// <returns></returns>
public ReturnCode Get(TWExtImageInfo info)
{
Session.VerifyState(7, 7, DataGroups.Image, DataArgumentType.ExtImageInfo, Message.Get);
return Dsm.DsmEntry(Session.AppId, Session.CurrentSource.Identity, Message.Get, info);
}
}
}
}
}

View File

@@ -10,6 +10,13 @@ namespace NTwain.Triplets
{
internal ImageLayout(ITwainSessionInternal session) : base(session) { }
/// <summary>
/// Gets both the size and placement of the image on the scanner. The
/// coordinates on the scanner and the extents of the image are expressed in the unit of measure
/// currently negotiated for ICAP_UNITS (default is inches).
/// </summary>
/// <param name="layout">The layout.</param>
/// <returns></returns>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
public ReturnCode Get(out TWImageLayout layout)
{
@@ -18,6 +25,14 @@ namespace NTwain.Triplets
return Dsm.DsmEntry(Session.AppId, Session.CurrentSource.Identity, Message.Get, layout);
}
/// <summary>
/// returns the default information on the layout of an image. This is the size and
/// position of the image that will be acquired from the Source if the acquisition is started with the
/// Source (and the device it is controlling) in its power-on state (for instance, most flatbed scanners
/// will capture the entire bed).
/// </summary>
/// <param name="layout">The layout.</param>
/// <returns></returns>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
public ReturnCode GetDefault(out TWImageLayout layout)
{
@@ -26,6 +41,11 @@ namespace NTwain.Triplets
return Dsm.DsmEntry(Session.AppId, Session.CurrentSource.Identity, Message.GetDefault, layout);
}
/// <summary>
/// This operation sets the image layout information for the next transfer to its default settings.
/// </summary>
/// <param name="layout">The layout.</param>
/// <returns></returns>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "0#")]
public ReturnCode Reset(out TWImageLayout layout)
{
@@ -34,6 +54,15 @@ namespace NTwain.Triplets
return Dsm.DsmEntry(Session.AppId, Session.CurrentSource.Identity, Message.Reset, layout);
}
/// <summary>
/// This operation sets the layout for the next image transfer. This allows the application to specify
/// the physical area to be acquired during the next image transfer (for instance, a frame-based
/// application would pass to the Source the size of the frame the user selected within the
/// application—the helpful Source would present a selection region already sized to match the
/// layout frame size).
/// </summary>
/// <param name="layout">The layout.</param>
/// <returns></returns>
public ReturnCode Set(TWImageLayout layout)
{
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.ImageLayout, Message.Set);

View File

@@ -16,6 +16,9 @@ namespace NTwain.Triplets
}
CieColor _cieColor;
/// <summary>
/// Gets the operations defined for DAT_CIECOLOR.
/// </summary>
public CieColor CieColor
{
get
@@ -27,6 +30,9 @@ namespace NTwain.Triplets
ExtImageInfo _extImgInfo;
/// <summary>
/// Gets the operations defined for DAT_EXTIMAGEINFO.
/// </summary>
public ExtImageInfo ExtImageInfo
{
get
@@ -38,6 +44,9 @@ namespace NTwain.Triplets
Filter _filter;
/// <summary>
/// Gets the operations defined for DAT_FILTER.
/// </summary>
public Filter Filter
{
get
@@ -48,6 +57,9 @@ namespace NTwain.Triplets
}
GrayResponse _grayResponse;
/// <summary>
/// Gets the operations defined for DAT_GRAYRESPONSE.
/// </summary>
public GrayResponse GrayResponse
{
get
@@ -58,6 +70,9 @@ namespace NTwain.Triplets
}
IccProfile _iccProfile;
/// <summary>
/// Gets the operations defined for DAT_ICCPROFILE.
/// </summary>
public IccProfile IccProfile
{
get
@@ -88,6 +103,9 @@ namespace NTwain.Triplets
}
ImageLayout _imgLayout;
/// <summary>
/// Gets the operations defined for DAT_IMAGELAYOUT.
/// </summary>
public ImageLayout ImageLayout
{
get
@@ -128,6 +146,9 @@ namespace NTwain.Triplets
}
JpegCompression _jpegComp;
/// <summary>
/// Gets the operations defined for DAT_JPEGCOMPRESSION.
/// </summary>
public JpegCompression JpegCompression
{
get
@@ -138,6 +159,9 @@ namespace NTwain.Triplets
}
Palette8 _palette8;
/// <summary>
/// Gets the operations defined for DAT_PALETTE8.
/// </summary>
public Palette8 Palette8
{
get
@@ -148,6 +172,9 @@ namespace NTwain.Triplets
}
RgbResponse _rgbResp;
/// <summary>
/// Gets the operations defined for DAT_RGBRESPONSE.
/// </summary>
public RgbResponse RgbResponse
{
get