/// <summary>
        /// ReadAnoDatBlock reads an "OiAnoDat" block.
        /// </summary>
        /// <param name="properties">The properties to be updated with the data.</param>
        /// <param name="stream">The stream to read the data in.</param>
        /// <param name="dataSize">The size of the data</param>
        private static bool ReadAnoDatBlock(WangAnnotationProperties properties, IWangStream stream, int dataSize)
        {
#if DEBUG
            Debug.Assert(stream.AvailableBytes() >= dataSize);
#endif // DEBUG
            if (properties.HasMarkAttributes)
            {
                switch (properties.MarkAttributes.Type)
                {
                case WangMarkType.StraightLine:
                case WangMarkType.FreehandLine:
                case WangMarkType.HollowPolygon:
                case WangMarkType.FilledPolygon:
                    int [] points = WangAnnotationStructureReader.ReadPoints(stream, dataSize);
                    properties.SetPoints(points);
                    return(true);

                case WangMarkType.ImageEmbedded:
                    WangRotation rotation = WangAnnotationStructureReader.ReadRotation(stream, dataSize);
                    properties.SetRotation(rotation);
                    return(true);

                default:
                    // TODO - David Ometto - 2016-11-22 - Add support for all types
                    break;
                }
            }
            return(false);
        }
        /// <summary>
        /// SendImageEmbeded sends an "Image Embedded" annotation to the handler.
        /// </summary>
        /// <param name="handler">The handler.</param>
        /// <param name="oiGroup">The group.</param>
        /// <param name="oiIndex">The index.</param>
        private static void SendImageEmbeded(
            IWangAnnotationHandler handler, string oiGroup, string oiIndex, int[] bounds, bool transparent,
            WangRotation rotation, string filename, byte[] dib)
        {
            // TODO - David Ometto - 2016-11-22 - Translate to GdPicture.NET proper annotation type.
            // Please see in detail the parameters that are just ignored for the moment.

            using (AutoPinner autoPinner = new AutoPinner(dib))
            {
                handler.AddEmbeddedImageAnnot(bounds[WangAnnotationTranslation.LeftIndex],
                                              bounds[WangAnnotationTranslation.TopIndex],
                                              bounds[WangAnnotationTranslation.RightIndex] - bounds[WangAnnotationTranslation.LeftIndex],
                                              bounds[WangAnnotationTranslation.BottomIndex] - bounds[WangAnnotationTranslation.TopIndex],
                                              autoPinner);
            }
        }