I'm a VB.NET newbie. I've created a program that plots pixels at random on
the form. I have a 19" LCD monitor with a resolution set to 1280 by 1024. If
you do the math, that means that there are over 1.3 million pixels. In one
version of the program, the pixels start plotting at the upper-left & go down
the form from top to bottom & left to right. In another version, the pixels
are plotted at random. I have a 2.4 GHZ Athlon 64 with 1 gigabyte of RAM. If
DrawImage is inside the For-Next loop, I can see the pixels being plotted.
It's sooo slooow! If DrawImage is outside of the For-Next loop, I sit & stare
at a blank form until the image is drawn. Unfortunately, there is no Pset or
its .NET equivalent. Microsoft in its infinite wisdom chose to not include
it. I want to be able to create a program that can draw fractals. I know that
fractal calculations are time-consuming. I don't want to have to wait for
hours to see a fractal. Is there a faster way to plot individual pixels
without having to resort to using Bitmap? Remember, I'm a newbie. I don't
want a complicated convoluted way to draw pixels. Can I create an object
that will plot pixels faster than Bitmap or am I out of luck? What is the
Path object? Can I use that to plot individual pixels? Thank you. David
Jul 7 '06
10 3311
Sorry I'm not currently in a position to open a windows app.
What you need will be found in the System.Drawing and
System.Drawing. Drawing2D namespaces. Its all called GDI+ . There will
be methods that are part of the Graphics class that enable you to draw
rectangles, arcs, circles, lines, etc. There should be one to draw a
dot as well.
You will need to realise though that once you paint it, it isn't a
permanent fixture on the form. If the form refreshes, or something
paints over it (ie another form, alert or whatever) then your drawn
pixels are gone. To get around this, you put your painting instructions
in the OnPaint event of your form/panel/wherever you want to paint to.
Let me know how you get on. I wanted at one stage to write a fractal
generater in .NET but never got around to it. And of course I found a
million of them on the net and decided there was no merit to it. Not
sure if this has been done before, but a newer idea might be to create
3D fractals in DIRECTX... now that would be mind blowing! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Nicolas Guilhot |
last post by:
Hi all !
I have a multi-page Tiff image file that I want to convert to PDF. To do so
I am using iText library. The conversion is working, but the code execution
is very different according to wich
iTextSharp.text.Image.getInstance(...) signature I am using :
- using code 1 below, the conversion is fast enough but the resulting PDF
file is too big (1 817ko sample Tiff file is converted in less than 30
seconds to a 2 764ko PDF file)
-...
|
by: Erwin |
last post by:
At the moment I'm using a report which contains an indicator to show
if a Service group of the company isn't working well or is working
perfectly. This indicator is a "*" which looks like a traffic light.
Example:
When a Service groep does hit the target, the indicator will lit up
using the following Control Source:
=IIf(>0,8*10*;"*")
But now, I would like the use a real bitmap, trafficlight bitmaps, to
|
by: Vin |
last post by:
Hi,
I am using the following code to draw whatever the user draws using
x,y.
// draws lines directly on a winform.
CreateGraphics().DrawLine(APen, x, y, OldX, OldY);
Now how do I save the drawing on to a bmp file on my harddisk? C# code
in this regard would be very helpful. I tried all forums but invain.
|
by: John Swan |
last post by:
Hello.
I'm trying to create a simple program that amongst other things creates a
thumbnail of an image (Bitmap) to a set size determined by the user in
pixels?
The problem is: All of the examples I have seen so far are in c#.
Can anyone please provide reference to a c++ managed version.
Thanks.
John
|
by: Jeff |
last post by:
Help!!!
The bitmap I am trying to display in a sample Crystal Report is coming
up with much less quality than the original bitmap.
I have a 300x300 dpi bitmap file that I want to insert at run time into
a Crystal Report. The path to the file is stored in a varchar(100)
field in a table in SQL Server.
The Crystal Report displays the bitmap in the IBlobField object but it
| |
by: pcnerd |
last post by:
I want to create a program that will do graphics like math functions &
fractals & stuff. I've been browsing thru books at the bookstores.
Apparently, the Point object replaced Pset. The books explain how to create a
Point object, but not how to use it. I want to be able to plot individual
pixels. I tried DrawEllipse, but that just draws circles. I reckon that I
have to somehow use the Pen & the Point object. I don't want to draw lines. I...
|
by: Bama |
last post by:
I already stored the image in the SQL database. How do I retrieve it? Any
help is appreciated.
|
by: Martijn Mulder |
last post by:
When I want to invoke Dispose() automatically on an object, I can use
using(object)
{
//do something with object
}
and after the closing brace the object is Disposed(). But what get
disposed when I use code like this
|
by: Nathan Sokalski |
last post by:
I am attempting to create icons for controls I have created using VB.NET by
using the System.Drawing.ToolboxBitmap attribute. I have managed to do this
in C# by specifying the path to the *.ico file, but I have been unable to
get any of the overloads to work in VB.NET. I would like to store the *.ico
files in a *.resx file so that users do not need anything other than the
*.dll, but at the moment I am just trying to get any of the overloads...
|
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: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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?
| |