Hi!
I'm using this code to add text to the GraphicsPath m_Gpath:
m_Gpath.AddStri ng(m_objectLabe l, otherFont.FontF amily,
(int)otherFont. Style, (int)otherFont. Size, new Point(m_MouseX,
m_MouseY), StringFormat.Ge nericDefault);
I'm using this code to paint Bitmap m_Bitmap on a picture control:
private void picSketch_Paint (object sender,
System.Windows. Forms.PaintEven tArgs e)
{
Graphics g = e.Graphics;
g.DrawImage(m_B itmap, new Rectangle(0, 0,
(int)(m_Bitmap. Width*Zoom), (int)(m_Bitmap. Height * Zoom)));
e.Graphics.Fill Path(new SolidBrush(skyo bjFontColor) ,
m_Gpath);
}
I'm using this to save bitmap:
m_Bitmap.Save(s aveFileDialog.F ileName, ext);
Now, I get the text (crisp, not smooth) in picture box, but saving the
m_Bitmap does not save text with it!
adding this does not help either:
e.Graphics.Draw Path(new Pen(Color.Red), m_Gpath);
Changing the order in picSketch_Paint doesn't help neither:
private void picSketch_Paint (object sender,
System.Windows. Forms.PaintEven tArgs e)
{
e.Graphics.Fill Path(new SolidBrush(skyo bjFontColor) ,
m_Gpath);
e.Graphics.Draw Path(new Pen(Color.Red), m_Gpath);
Graphics g = e.Graphics;
g.DrawImage(m_B itmap, new Rectangle(0, 0,
(int)(m_Bitmap. Width*Zoom), (int)(m_Bitmap. Height * Zoom)));
}
Can someone with an experience with this sort of thing help me please?
I suppose there should be a way to "glue" graphics path to bitmap but
I don't know how.
thanks all,
jay 0 2113 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Altramagnus |
last post by:
I have a complicated Region object, which I need to draw the outline, but
not fill
How can I convert the Region object to GraphicsPath object?
or How can I draw the outline of the Region object?
|
by: Altramagnus |
last post by:
I have n number of circles. Some of them might overlap.
I need to draw the outline of all circles but not those overlap areas.
Initially, I am try to use a Region, because a Region object has a Union
function
Creating a GraphicsPath of 1 circle is easy. So I convert each GraphicsPath
to a Region and then Union them.
But I could not get back a GraphicsPath of the Unioned Region.
Does anyone know how to solve my problem?
|
by: jay |
last post by:
I have a bitmap and a graphicspath object. I draw pixels on m_Bitmap and I'm
drawing text using m_Graphics GraphicsPath object.
However, saving my work with m_Bitmap.Save doesn't save GraphicsPath along
with it.
How do I save it all in a single file? Or how do I "glue" graphicspath to
bitmap so they save together?
thanks,
|
by: Crirus |
last post by:
Hi
Is that true that this IsVisible method is incredible slow?
Seems that my app is much slower with only this added as a condition to draw
something
Crirus
|
by: Martijn Mulder |
last post by:
/*
GraphicsPath.IsVisible() gives unexpected results. I fill a
System.Drawing.Drawing2D.GraphicsPath-object with PointF-structures
that define the unit-square (0,0), (1,0), (1,1) and (0,1). Then I
test 3 different PointF-structures to see if they fall inside the unit-
square and the results are clearly wrong:
Point(-0.2, -0.2) falls inside the unit square... WRONG!!!
Point(0.2, 0.2) falls inside the unit square...
Point(0.7, 0.7) falls...
| |
by: estufa |
last post by:
Hi all.
I have a problem drawing a string somewhere inside a path using
AddString.
It looks very large in Y axis and very short in X axis.
That's because I have near of 1600 units in X axis and aprox 30 in Y
axis and when I transform (scale) the path to fit the PictureBox, it
also stretches the font.
Is there a way to specify a different Width for a font type using
AddString?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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 we have to send another system
|
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |