Hello
I was wondering if you guys know how i can apply a picture as texture on
text?
I have this:
Font font = new Font("Verdana", 18);
SolidBrush sb = new SolidBrush(Color.Red);
Bitmap tb = new Bitmap(200,60);
Graphics bmpGraphics = Graphics.FromImage(tb);
font.GetHeight
bmpGraphics.Clear(Color.White);
bmpGraphics.DrawString("Lasse", font, sb, 14, 10);
tb.Save(@"c:\inetpub\wwwroot\dbtest\text.jpg", ImageFormat.Jpeg); 3 1692
Hi Lasse,
You can use a TextureBrush
Image i = Image.FromFile("n:\\open-gate.jpg");
TextureBrush b = new TextureBrush(i);
Graphics.DrawString("HELLO WORLD", new Font("Arial", 30), b, 50, 50);
--
Happy coding!
Morten Wennevik [C# MVP]
Morten,
thanks, but when I write
Image i = new Image. I only get "GetThumbnailImageAbort" shown in that
droplist.
i've got:
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
have i forgot something?
TIA
/Lasse
Morten Wennevik" <Mo************@hotmail.com> wrote in message
news:opse219kttklbvpo@stone... Hi Lasse,
You can use a TextureBrush
Image i = Image.FromFile("n:\\open-gate.jpg"); TextureBrush b = new TextureBrush(i); Graphics.DrawString("HELLO WORLD", new Font("Arial", 30), b, 50, 50);
-- Happy coding! Morten Wennevik [C# MVP]
errr...... never mind :D
thx for helping :)
/Lasse
"Morten Wennevik" <Mo************@hotmail.com> wrote in message
news:opse219kttklbvpo@stone... Hi Lasse,
You can use a TextureBrush
Image i = Image.FromFile("n:\\open-gate.jpg"); TextureBrush b = new TextureBrush(i); Graphics.DrawString("HELLO WORLD", new Font("Arial", 30), b, 50, 50);
-- Happy coding! Morten Wennevik [C# MVP] This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Mark L |
last post by:
I am trying to create a graphics engine using OpenGL and PHP. I am
currently trying to create a completly white texture to test out the
texturing capabilities.
My idea is to create an array...
|
by: Xpyder |
last post by:
hey - i am developing a game editor in C++/DX and have encountered a
problem.
when i create map sturcture array (like below) to represent tile
textures:
o,1,o,
1,1,o,
1,1,1,
1,1,o,
|
by: Myk Quayce |
last post by:
I have a four-sided polygon that rotates and zooms as the user moves the mouse. Is there a way to incorporate a texture-mapped
image without DirectX? The GDI+ doesn't seem to support this.
--
...
|
by: Kuba Florczyk |
last post by:
Hi
I'am working on a 3D realtime "video" mixer. For now everything is ok i made
video/images/sound mixing in 3D space.
But now i draw flash movie on a texture.
My question is: how do it?
...
|
by: x |
last post by:
Still fairly new at this, I have been trying to find out how to compile and
effect with multiple samplers.
Been able to find loads of examples that show the HSL code once the samplers
are...
| |
by: =?ISO-8859-2?Q?Rafa=B3?= Maj |
last post by:
Say we have a class Model (a 3d model) and class Texture (representing an
Texture).
Model have a texture, Model can be Drawed. Texture have method that returns
data needed for drawing.
class...
|
by: ...:::JA:::... |
last post by:
Hello,
Is there any real easy example for loading an texture in your directpython
window???
For example this is my code:
# loading directpython modules
import d3dx
import d3d
from d3dc...
|
by: colin |
last post by:
Hi,
Ive written a 3dmodel editor, and it works fairly well
it harldy uses any cpu exept when its loading a texture from bitmap
in the debugger, at all other times it hardly uses any cpu
but from...
|
by: brixton |
last post by:
Hello,
I've got the following code that creates a texture from a .RAW file:
GLuint MyGLCanvas::LoadTextureRAW( const char * filename, int wrap )
{
GLuint texture;
int width, height;
...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |