It is currently Sat May 27, 2017 11:40 pm



Welcome
Welcome to rfobasic

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today. **You are not required to provide truthful information to any registration questions. Be whomever you wish to be.!


Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Transparent Colors?
Unread postPosted: Wed Apr 26, 2017 11:34 pm 
Offline
User avatar

Joined: Sat Mar 26, 2016 9:23 am
Posts: 94
Do we have?
I didn't see anything in the manual.
But Moug (?) mentioned it in one of his examples?

! Draw Bitmap1 ===================================== Bitmap1
GR.BITMAP.LOAD TmpPtr, "DiaLtransparent.png"


Report this post
Top
 Profile  
 
 Post subject: Re: Transparent Colors?
Unread postPosted: Thu Apr 27, 2017 12:46 am 
Offline
User avatar

Joined: Tue Jan 03, 2012 9:31 am
Posts: 5518
Location: Paris, France
See GR.COLOR in the manual.
"alpha" is another name for transparency.

Nicolas

_________________
- Creator of the Android BASIC! Compiler


Report this post
Top
 Profile  
 
 Post subject: Re: Transparent Colors?
Unread postPosted: Thu Apr 27, 2017 12:49 am 
Offline
User avatar

Joined: Sat Oct 04, 2014 5:45 am
Posts: 642
Example transparent drawing is like this
Code:
! Draw TchRect1 Invisible Obj ==================
GR.COLOR 0, 0, 0, 0, 1
GR.RECT Screen1[1], 70, 65, 222, 117

RfoDesigner use the TchRect object to define touch regions on say sections of a bitmap.
A png image file has the ability to be transperent.
The png image is not transparent if it was not created that way.
Paint.Net can be used to convert any image to an transparent png image.

Emile

_________________
Download and tutorial for RFODESIGNER
https://sites.google.com/site/rfodesigner/


Report this post
Top
 Profile  
 
 Post subject: Re: Transparent Colors?
Unread postPosted: Thu Apr 27, 2017 10:01 am 
Offline
User avatar

Joined: Sat Mar 26, 2016 9:23 am
Posts: 94
Thanks!


Report this post
Top
 Profile  
 
 Post subject: Re: Transparent Colors?
Unread postPosted: Thu Apr 27, 2017 11:39 am 
Offline
User avatar

Joined: Sat Mar 26, 2016 9:23 am
Posts: 94
Playing around with the Dial code again.

Got the dial turning back and forth. Simple enough once all the numbers agree.

The green parts of the dial should be transparent.
If that would work the rest of the program would be simple.
But I'm not at all sure about what I read, or what was said(??).

Anyway, here's where it is at the moment...
|


Attachments:
Dial3.zip [8.89 KiB]
Downloaded 10 times
Report this post
Top
 Profile  
 
 Post subject: Re: Transparent Colors?
Unread postPosted: Thu Apr 27, 2017 11:44 am 
Offline
User avatar

Joined: Sat Mar 26, 2016 9:23 am
Posts: 94
PS: Moug!

BASIC! Launcher is fabulous!

I'm using it on a USB cable, since I travel.
This thing makes playing with tablet code a lot more enjoyable.

Thanks.


Report this post
Top
 Profile  
 
 Post subject: Re: Transparent Colors?
Unread postPosted: Thu Apr 27, 2017 6:19 pm 
Offline
User avatar

Joined: Sat Mar 26, 2016 9:23 am
Posts: 94
mougino wrote:
See GR.COLOR in the manual.
"alpha" is another name for transparency.

Nicolas



Hi Nicolas,

Playing around with it, alpha looks more like "saturation" than transparency.

Got any example code?

Richard


Report this post
Top
 Profile  
 
 Post subject: Re: Transparent Colors?
Unread postPosted: Fri Apr 28, 2017 12:21 am 
Online

Joined: Sat Mar 02, 2013 11:04 am
Posts: 841
Location: France
In keeping with what emile tells you the code is actually quite simple...

See http://rfobasic.freeforums.org/viewtopic.php?f=4&t=4470&hilit=dial.

Cheers

Gilles

_________________
"It is better to mobilize intelligence for stupid things, rather than mobilizing stupidity for intelligent things."
Galaxy TAB S 8.4, 2560x1600, Marshmallow 6.0.1
Galaxy Note II, 1280x720, JB4.1.2
Galaxy A3, 1280x720, Android 6.0.1


Report this post
Top
 Profile  
 
 Post subject: Re: Transparent Colors?
Unread postPosted: Fri Apr 28, 2017 1:22 am 
Offline

Joined: Tue Dec 04, 2012 10:50 am
Posts: 656
Location: UK
cavelamb wrote:
Playing around with it, alpha looks more like "saturation" than transparency.

Why do you say that? I associate the term "saturation" with use of deeper colours, such as might be obtained by exaggerating the proportion of the strongest colour in each pixel. The opposite of pastel.

Mike.


Report this post
Top
 Profile  
 
 Post subject: Re: Transparent Colors?
Unread postPosted: Fri Apr 28, 2017 4:35 am 
Offline
User avatar

Joined: Sat Oct 04, 2014 5:45 am
Posts: 642
Cavelamb wrote:
The green parts of the dial should be transparent.

Gilles wrote:
In keeping with what emile tells you the code is actually quite simple...

Emile wrote:
The png image is not transparent if it was not created that way.
Paint.Net can be used to convert any image to an transparent png image.

Download Paint.Net it is free.
Select the "Green" with the "MagicWand" and "Delete"
The deleted green sections will be transperent 8-)
Also download Gilles's version at the link he supplied.

Emile

_________________
Download and tutorial for RFODESIGNER
https://sites.google.com/site/rfodesigner/


Report this post
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2, 3  Next


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
suspicion-preferred