how can create nine patch png or use nine patch png picture in vb6?(any way?)
hi i am looking for use nine patch pictures in vb6. any body hv sample or source code for do it?
for example i want create uc control button (use png picture) and when user resized button so button resize too without any scale problem.
As far as developing this yourself. Gotta think this isn't too difficult, in theory. Since the stretch areas are defined by a 1 pixel buffer around the image, it's a matter of locating the non-transparent parts of that one-pixel buffer. Once those are known, you have the areas of the image that can be stretched vertically, horizontally or both.
Definitely could be some fun developing this for VB users. If I didn't have a bunch of other stuff on my plate, I think I'd give it a shot, including a designer tool to create/modify them. Heck, if Olaf sees this post, you might get an addition to his RC5 project if it doesn't already exist there
Insomnia is just a byproduct of, "It can't be done"
Re: how can create nine patch png or use nine patch png picture in vb6?(any way?)
I'm wondering if this technique can by used w/ icons on DPI aware apps. The idea is to *downsample* an original 32x32 and at some point *upsample* when scaling goes beyond 200%
Re: how can create nine patch png or use nine patch png picture in vb6?(any way?)
That's pretty much what LoadIconWithScaleDown function is for. By including several images for likely sizes it can give enhanced results by skipping any scaling at all.
Re: how can create nine patch png or use nine patch png picture in vb6?(any way?)
i can use like this tools for create 9patch picture but i want know how use in vb6(png format is matter for me,i want keep transparent picture property too)
Re: how can create nine patch png or use nine patch png picture in vb6?(any way?)
Here is a sample cNinePatch class that implements the android specification (including repeating parts). Heavily based on 9patch.js, included PNGs in res folder from Ogre's Lab blog.
Included ctxNineButton is a transparent windowless user control that accepts 9-patches for normal/hover/pressed/focused button states and implements blending animation for state transition.
cheers,
</wqw>
Last edited by wqweto; Apr 16th, 2018 at 09:04 AM.