Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Macros and drawing lines....and basic layout of a gauge

Featured Replies

I have read the Panel SDK and I have a few questions.1) Can I draw a line using a generic function, instead of using the MAKE_STATIC macro and(gag me) using a bitmap?2) If the answer to question 1 is something like "Always use macros, there are no generic functions to draw primatives like lines, or the like", do I always need to use a bitmap or is there a way I can use drawing primatives? If I create a 744 like PFD with the compase rose on the bottom, will I need to have a circular bitmap that rotates around a point? I know the circular bitmap would be easier than using drawing primatives, but that is just an example 3) In a gauge file...how would I go about laying down the 'framework' so that I can update variables, redraw bitmaps and(hopefully) drawing primatives and the like? Do macros always redraw themselves everytime the panel is updated?Thanks a bunch for any help you can give me!!

1) The only way to do this would be to make a vector gauge. Vector gauges are drawn using the windows api instead of gauge macros. You have to have a black background and draw all of the elements of the gauge using the primitives. Obviously, this is much more difficult than using the macros. Download Dai Griffith's gauge tutorial. It has some examples of vector gauges with it.2) Just like you said, you would need to have a circular card that rotates around the center. Unless you're doing some heavy-duty gauge programming, for the most part just stick with the macros.3) The macros will automatically redraw whenever the panel is updated. If you tell the element macro which variable it should reference, it will automatically refresh that variable and draw the correct value. If not, you will have to use an Element Callback and tell the gauge what value to use for the redraw.You can see all of the bitmaps that go into a gauge here: http://www.flightsimnetwork.com/dcforum/DCForumID3/7049.htmlHope this helps! ;)Matt

Matt Kaprocki

Boeing777_Banner_DevTeam.jpg

For fastest support, please submit a ticket at http://support.precisionmanuals.com

Matt --Thanks a bunch!! That answer my questions perfectly. I downloaded that tutorial you mentioned and I have looked at the WinAPI GDI, and I am going to have my work cut out for me!!Thanks a bunchFred

Hi Fred,the new SDK provides a IMAGE_CREATE_DIBSECTION flag for helping out things.Hope it helps!

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.