Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6324601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:44:06+00:00 2026-05-24T16:44:06+00:00

In my application I need to draw a large network (basically, little boxes connected

  • 0

In my application I need to draw a large network (basically, little boxes connected with lines) and the user will be able to zoom and pan it around.

My first option was to draw the network directly to the canvas, but I thought that was not very efficient, because each time a pan event occurs, the drawing process begins again.

So I tried to use a large mutable bitmap and draw my entire network only once (or at least whenever zoom occurs), and blit the necessary areas to the canvas.

My problem is, since the network is rather big, I get OOM exception when creating the bitmap…

What should I do? Draw directly to the canvas? Use several smaller bitmaps?

Thanks,
Direz

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T16:44:06+00:00Added an answer on May 24, 2026 at 4:44 pm

    You’re probably not going to like this, but if all you’re doing is drawing boxes and lines, the efficiency of the canvas is going to be pretty dang high. Are you getting UI lag or something?

    One thing I have messed around with is drawing collections of subcomponents that won’t change much or at all to a bitmap then rendering (scaling/moving aren’t all that expensive if done at the right level) to the canvas can help efficiency. I have tried in the past to create a framework for rendering a tile-like subset of an existing larger image, but did not meet much success. I’ve made things work, but the code just gets ugly.

    Oh, also a quick test to see if the component you are rendering is within the rectangle created by the screen can save you a bunch of processor time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In an application I need to execute other programs with another user's credentials. Currently
I am developping an application where I need to draw a graph on the
In my C# winforms application I need to draw blocks. These blocks are so
My original question: I'm creating a simple drawing application and need to be able
I am writing a VCL/Delphi Application, and I need to draw text onto a
I need a very simple function to draw a bunch of lines with anti-aliasing.
I am developing a small flash application. In my application a user can draw
A brief background: I'm working on a web-based drawing application and need to draw
I'm working on a web application that need to allow the user to drag
I need to draw concentric circles in my Flex application. I am trying to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.