Jump to content

Anti-aliasing custom controls


Recommended Posts

Hi all,

 

I'm trying to anti-alias my vector-based custom controls. I know it's possible:

 

post-53197-0-37846600-1422965009.png

 

The left hand circle is my custom control, the other 3 are various circular controls taken from the Silver controls palette.

 

Obviously the anti-aliasing is not a public feature and is part of NI's internal control definition. Has anyone succeeding in either exposing this hidden property as something to be turned on, or editing the raw .ctl file code to enable anti-aliasing? 

 

Any ideas?

 

Thanks,

Mark

Link to comment

I don't believe is is just an anti-aliasing issue.  Your image is going to also need to be an image that is in a vector type format.  The only format I know that is supported is WMF.  The Image Navigator is part of the DSC toolkit and comes with a bunch of WMF images and allows you to change the color then copy them, then you can replace the buttons with that image.  Then these images scale well.  Attached is a switch I made by replacing the True and False images with two from the WMF format.

 

Now if there is more NI features to make anti-aliasing better, I don't know.  But I do know of the enable secret popups as mentioned by Christina here.

 

https://lavag.org/topic/18469-i-found-some-more-hidden-ini-keys/#entry110810

 

EnableSecretPopups=True

 

I was hoping that would have the menu might have something else for handling this but it doesn't.

WMF Switch.vi

Link to comment

Hi hooovahh,

 

My controls are already vector based, I've imported the decals from an EMF file and they do scale really well as you can see here:

 

post-53197-0-16074200-1422987921_thumb.p

 

But you can also see they look bad without anti-aliasing. I already had the EnableSecretPopups=True set for getting the scaling behaviour of these controls to be correct, it's a shame it doesn't expose more functionality!

 

Nice tip on looking at the DSC toolkit controls, I'll take a look at this to see if I can misuse any of the controls.

Edited by MarkBarnes
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.