コード例 #1
0
        private void DrawText(byte opacity, ImageWithDeviceContext destImage)
        {
            Rectangle textBounds = this.TextBounds;

            TitleRenderer.DrawText(Text, destImage,
                                   textBounds.Location, textBounds.Size,
                                   opacity, TextColorBrush,
                                   StringFormat, Font);
        }
コード例 #2
0
        protected override void DrawBackground(ImageWithDeviceContext destImage)
        {
            base.DrawBackground(destImage);

            if (Text.Length > 0)
            {
                Rectangle textBounds = Bounds;

                TitleRenderer.DrawText(Text, destImage,
                                       new Point(RealX, RealY), textBounds.Size,
                                       Opacity, TextColorBrush,
                                       StringFormat, Font);
            }
        }