Click here to Skip to main content
15,891,529 members
Home / Discussions / C#
   

C#

 
GeneralRe: Validating TextBox Pin
Martin#18-Jun-07 5:22
Martin#18-Jun-07 5:22 
GeneralRe: Validating TextBox Pin
Fatbuddha 118-Jun-07 21:14
Fatbuddha 118-Jun-07 21:14 
AnswerRe: Validating TextBox Pin
lsconyer18-Jun-07 4:57
lsconyer18-Jun-07 4:57 
AnswerRe: Validating TextBox Pin
DavidNohejl18-Jun-07 5:11
DavidNohejl18-Jun-07 5:11 
QuestionSimple code generation Pin
gantww18-Jun-07 4:03
gantww18-Jun-07 4:03 
AnswerRe: Simple code generation Pin
Giorgi Dalakishvili18-Jun-07 4:07
mentorGiorgi Dalakishvili18-Jun-07 4:07 
GeneralRe: Simple code generation Pin
gantww18-Jun-07 4:36
gantww18-Jun-07 4:36 
QuestionGraphics.DrawLines and Coordinate translation Pin
Jon Hulatt18-Jun-07 3:37
Jon Hulatt18-Jun-07 3:37 
Hi All,

One section of my app involves drawing multi point lines over the top of an image. The image scrolls.

I have internally a list of (world) coordinates, and in every OnPaint handler i'm recalculating the screen coordinates that these correspond to, so that I have a Point[] array, which can be used in Graphics.DrawLines

Problem is that the coordinate calculations are rather slow, and profiling the code shows quite a chunk of time wasted in this part of the app.

I can precalculate the coordinates, but they will still need translating as the image is drawn because it scrolls. But this translation would be simple, because it's just linear.

Does anyone know of an optimised way of translating a large set of coordinates? Or will i just need to loop around my list and do it that way?

Thanks

Jon

using System.Beer;

AnswerRe: Graphics.DrawLines and Coordinate translation Pin
Luc Pattyn18-Jun-07 3:49
sitebuilderLuc Pattyn18-Jun-07 3:49 
GeneralRe: Graphics.DrawLines and Coordinate translation Pin
Jon Hulatt18-Jun-07 4:00
Jon Hulatt18-Jun-07 4:00 
QuestionVerfying Chain Verification Process Pin
suprajav18-Jun-07 3:29
suprajav18-Jun-07 3:29 
QuestionSharePoint Development Pin
alexfromto18-Jun-07 3:09
alexfromto18-Jun-07 3:09 
QuestionMovable Selection Box Pin
R.Myers18-Jun-07 2:54
R.Myers18-Jun-07 2:54 
AnswerRe: Movable Selection Box Pin
Chintan.Desai18-Jun-07 3:22
Chintan.Desai18-Jun-07 3:22 
GeneralRe: Movable Selection Box Pin
R.Myers18-Jun-07 7:35
R.Myers18-Jun-07 7:35 
QuestionListView control and key strokes Pin
zaboboa18-Jun-07 2:15
zaboboa18-Jun-07 2:15 
AnswerRe: ListView control and key strokes Pin
RepliCrux18-Jun-07 2:32
RepliCrux18-Jun-07 2:32 
GeneralRe: ListView control and key strokes Pin
zaboboa18-Jun-07 2:35
zaboboa18-Jun-07 2:35 
Questionaccess denied in case of share folder Pin
devesh_code18-Jun-07 2:08
devesh_code18-Jun-07 2:08 
AnswerRe: access denied in case of share folder Pin
RepliCrux18-Jun-07 2:28
RepliCrux18-Jun-07 2:28 
GeneralRe: access denied in case of share folder Pin
devesh_code18-Jun-07 2:34
devesh_code18-Jun-07 2:34 
GeneralRe: access denied in case of share folder Pin
mav.northwind18-Jun-07 8:56
mav.northwind18-Jun-07 8:56 
GeneralRe: access denied in case of share folder Pin
devesh_code18-Jun-07 19:35
devesh_code18-Jun-07 19:35 
QuestionHow can we use Treeview inside DataGrid...? Pin
fmlove18-Jun-07 1:58
fmlove18-Jun-07 1:58 
AnswerRe: How can we use Treeview inside DataGrid...? Pin
\laddie18-Jun-07 19:13
\laddie18-Jun-07 19:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.