Re: How to Drawstring with a character drawn "partially"?
From: kjon (2_at_22.co)
Date: 06/08/04
- Next message: Bob Powell [MVP]: "Re: Any function to identify it is animated Gif or not animated Gif"
- Previous message: John: "Any function to identify it is animated Gif or not animated Gif"
- Maybe in reply to: kjon: "How to Drawstring with a character drawn "partially"?"
- Next in thread: Bob Powell [MVP]: "Re: How to Drawstring with a character drawn "partially"?"
- Reply: Bob Powell [MVP]: "Re: How to Drawstring with a character drawn "partially"?"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 8 Jun 2004 13:11:45 +0800
Thanks Bob. Your sites have been very helpful.
Regarding drawing text character partially, I'm not too sure how to use the
method you suggest? It would be nice if you could give me some example on
how to calculate the position of the text, or using a clipping region?
Thanks.
"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:%23$8dfG8SEHA.3332@tk2msftngp13.phx.gbl...
> You could draw the text without setting a layout rectangle, perhaps just
> calculate the start position of the text.
>
> To clip the text to a specific rectangle use the rectangle to create a
> clipping region on the graphics object.
>
> --
> Bob Powell [MVP]
> Visual C#, System.Drawing
>
> Image transition effects, snap-to-grid and Layered Windows are
> all discussed in May's edition of Well Formed for C# or VB programmers
> http://www.bobpowell.net/currentissue.htm
>
> Answer those GDI+ questions with the GDI+ FAQ
> http://www.bobpowell.net/gdiplus_faq.htm
>
> The GDI+ FAQ RSS feed: http://www.bobpowell.net/faqfeed.xml
> Windows Forms Tips and Tricks RSS: http://www.bobpowell.net/tipstricks.xml
> Bob's Blog: http://bobpowelldotnet.blogspot.com/atom.xml
>
>
>
>
>
>
> "kjon" <y@y.co> wrote in message
> news:%23WwTNBsSEHA.1308@TK2MSFTNGP10.phx.gbl...
> > Hi, I'm trying to use Drawstring to draw a text which can let the
> rightmost
> > character of the text only shown partially.
> >
> > Have tried on DrawString(String, Font, Brush, RectangleF), which I can
> size
> > the rectangle with the text that fit into the rectangle will only be
> drawn.
> >
> > But I find that if a character cannot fit into the rectangle, the whole
> > character will not be drawn unless the size of the rectange increase,
the
> > character just cannot be drawn partially according to the rectangle
size.
> >
> > Is it possible to do this with drawstring? Or is there any other methods
> > should I use to achieve this effect? Please advice. Thanks in advance.
> >
> >
>
>
- Next message: Bob Powell [MVP]: "Re: Any function to identify it is animated Gif or not animated Gif"
- Previous message: John: "Any function to identify it is animated Gif or not animated Gif"
- Maybe in reply to: kjon: "How to Drawstring with a character drawn "partially"?"
- Next in thread: Bob Powell [MVP]: "Re: How to Drawstring with a character drawn "partially"?"
- Reply: Bob Powell [MVP]: "Re: How to Drawstring with a character drawn "partially"?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|