Esempio n. 1
0
 /// <summary>
 /// Assigns words its width and height
 /// </summary>
 /// <param name="g">the device to use</param>
 internal override void MeasureWordsSize(RGraphics g)
 {
     if (!this._wordsSizeMeasured)
     {
         MeasureWordSpacing(g);
         this._wordsSizeMeasured = true;
     }
     CssLayoutEngine.MeasureImageSize(this._imageWord);
 }
Esempio n. 2
0
        /// <summary>
        /// Assigns words its width and height
        /// </summary>
        /// <param name="g">the device to use</param>
        internal override void MeasureWordsSize(RGraphics g)
        {
            if (!this._wordsSizeMeasured)
            {
                if (this._imageLoadHandler == null && (HtmlContainer.AvoidAsyncImagesLoading || HtmlContainer.AvoidImagesLateLoading))
                {
                    this._imageLoadHandler = new ImageLoadHandler(HtmlContainer, OnLoadImageComplete);

                    if (this.Content != null && this.Content != CssConstants.Normal)
                    {
                        this._imageLoadHandler.LoadImage(this.Content, HtmlTag != null ? HtmlTag.Attributes : null);
                    }
                    else
                    {
                        this._imageLoadHandler.LoadImage(GetAttribute("src"), HtmlTag != null ? HtmlTag.Attributes : null);
                    }
                }

                MeasureWordSpacing(g);
                this._wordsSizeMeasured = true;
            }

            CssLayoutEngine.MeasureImageSize(this._imageWord);
        }