LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-19-2004, 04:58 AM   #1
Inprise
LQ Newbie
 
Registered: Nov 2004
Posts: 1

Rep: Reputation: 0
graphical programming, draw a line for example?


Hi,

In Linux's textual enviroment (not in X, not by GTK+ or Qt lib),
how can I draw a line for example? or draw a blue circle?
with C or C++ ...

TIA and forgive me for my poor English written.
 
Old 11-19-2004, 05:35 AM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
not in X, not by GTK+ or Qt lib
I suppose you want to use framebuffer device ? Look for SDL library so
http://www.libsdl.org/index.php
 
Old 11-19-2004, 06:56 AM   #3
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
Re: graphical programming, draw a line for example?

Could you be please be more clear?

Because this question:
Quote:
Originally posted by Inprise
In Linux's textual enviroment (not in X, not by GTK+ or Qt lib),
how can I draw a line for example?
...could probably be answered best with:
Code:
#include <stdio.h>

int main()
{
    puts("--------------------------------");
    return 0;
}
...and I guess this is not what you mean...
 
Old 11-19-2004, 07:18 AM   #4
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244


And for a blue circle in textual mode, try :
Code:
#include <stdio.h>

int main()
{
    puts("\033[34m");
    system("banner o");
    puts("\033[0m");
    return 0;
}
 
Old 11-19-2004, 11:40 AM   #5
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
There's also the nicely named libcaca:
http://sam.zoy.org/projects/libcaca/
 
Old 11-19-2004, 12:53 PM   #6
sio
Member
 
Registered: Jul 2003
Location: Louisiana, US
Distribution: Slackware
Posts: 129

Rep: Reputation: 15
#include <stdlib.h>

with Cedriks blue O
 
Old 11-19-2004, 02:45 PM   #7
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
Maybe something like this ...

Code:
convert -size 420x420 "xc:#FFFFFF" -draw 'line 225,200 200,200' test.jpg
or
convert -size 420x420 "xc:#FFFFFF" -draw 'circle 225,200 200,200' test.jpg
 
Old 11-19-2004, 03:17 PM   #8
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
Quote:
#include <stdio.h>

int main()
{
puts("\033[34m");
system("banner o");
puts("\033[0m");
return 0;
}
Hey, I haven't used banner for years!!!
I remember using it in Unix, but not in linux, most distros don't have banner
then I googled it and found the source.
You made me a happy man

...well for about 15 minutes
 
Old 11-21-2004, 05:27 AM   #9
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
perfect_circle> try figlet
http://www.figlet.org/
 
Old 11-21-2004, 10:17 AM   #10
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
thanx!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
C++ beginner - libraries and graphical programming TotalLinuxNoob Programming 6 11-10-2005 07:35 AM
graphical programming asahlot Programming 1 10-13-2005 09:07 AM
programming graphical program tearinox Programming 6 01-10-2004 11:36 AM
Graphical programming and Linux marek Programming 2 09-10-2003 02:21 PM
Simple graphical linux programming language? Nerd2 Linux - Software 4 05-03-2003 07:12 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration