01-10-2013
Draw multicolor line
Hello. I need to draw many lines with multicolor (color is set by some pixmap (xpm)) on C++ with standart libs.
Horizontal lines are drawing succsessfully with GC and XSetTile. But non-horizontal - no good.
I rotate pixmap for all lines and then XSetTile for each line with own pixmap, but it's bad idea.
How I can do this with standard libraries (xlib only. Without Qt, OpenGL etc.)?
10 More Discussions You Might Find Interesting
1. Solaris
Hi all..
I am trying to draw a line on the monitor on sun platform machine. I tried a simple program.
#include<stdio.h>
#include<plot.h>
int main()
{
openpl();
linemod("dotted");
line(1000,1000,2000,2000);
closepl();
return 0;
}
It doesn't produce the desired result.
If one... (0 Replies)
Discussion started by: shivamasam
0 Replies
2. Shell Programming and Scripting
I want to draw a horizontal and vertical line on Unix. Please suggest some solution. (11 Replies)
Discussion started by: allways4u21
11 Replies
3. Shell Programming and Scripting
Hi all,
I need to create a matrix of variable rows and columns. Right now i have 3 rows and two columns and following values.
Output something like
TypeA TypeB
TestCase1 Pass Fail
TestCase2 Pass ... (2 Replies)
Discussion started by: jakSun8
2 Replies
4. UNIX and Linux Applications
Hi guys,
I need a software for Ubuntu
*which has the capabilities of Corel Draw
*which can open/import and use a .cdr template, i.e., template created by Corel Draw.
*which has the same color codes, i.e., names for colors
I have looked through Google, some suggested ones are Inkscape,... (7 Replies)
Discussion started by: apprentice
7 Replies
5. Ubuntu
Hi Sir,
i am new to openGL, i want to know how to draw cylinder using openGL code in C or C++..
And i have to insert bitmap images on cylinder..
How to do this .. please guide me ...
Thanking You in advance .. (0 Replies)
Discussion started by: Ravikishore
0 Replies
6. Programming
Hi,
please give me, how to code to draw 3D cylinder in openGL, that should be rotated in x-direction.
waiting for your reply .. (2 Replies)
Discussion started by: Ravikishore
2 Replies
7. What is on Your Mind?
Do you draw flowcharts while you do the programming , design new network or simmilar ? (8 Replies)
Discussion started by: solaris_user
8 Replies
8. Programming
For example, I have a file called data.txt. And the content is:
Iker_Casillas 181
Raphael_Varane 182
Sergio_Ramos 182May I know how to write a script for gnuplot, so I can have a bar graph as the column 1 will be the x and column 2 will be the y? And I hope that the x value can be seen clearly.... (0 Replies)
Discussion started by: Tzeronone
0 Replies
9. Shell Programming and Scripting
https://www.unix.com/attachment.php?attachmentid=6304&d=1432179166
how can draw line like this? on ubuntu, shell programming.
i tried "-" , " l " but it's failed.. (2 Replies)
Discussion started by: gotit
2 Replies
10. What is on Your Mind?
What is on Your Mind?
2018 FIFA World Cup - Wikipedia
I'm hoping that England are drawn into positions B2, D3, G3 or G4 so that all their games will be outside usual UK office hours and people will not desert the office with mystery illnesses to watch the games.
Expecting failure, so I... (1 Reply)
Discussion started by: rbatte1
1 Replies
LEARN ABOUT SUSE
tk_freepixmap
Tk_GetPixmap(3) Tk Library Procedures Tk_GetPixmap(3)
__________________________________________________________________________________________________________________________________________________
NAME
Tk_GetPixmap, Tk_FreePixmap - allocate and free pixmaps
SYNOPSIS
#include <tk.h>
Pixmap
Tk_GetPixmap(display, d, width, height, depth)
Tk_FreePixmap(display, pixmap)
ARGUMENTS
Display *display (in) X display for the pixmap.
Drawable d (in) Pixmap or window where the new pixmap will be used for drawing.
int width (in) Width of pixmap.
int height (in) Height of pixmap.
int depth (in) Number of bits per pixel in pixmap.
Pixmap pixmap (in) Pixmap to destroy.
_________________________________________________________________
DESCRIPTION
These procedures are identical to the Xlib procedures XCreatePixmap and XFreePixmap, except that they have extra code to manage X resource
identifiers so that identifiers for deleted pixmaps can be reused in the future. It is important for Tk applications to use these proce-
dures rather than XCreatePixmap and XFreePixmap; otherwise long-running applications may run out of resource identifiers.
Tk_GetPixmap creates a pixmap suitable for drawing in d, with dimensions given by width, height, and depth, and returns its identifier.
Tk_FreePixmap destroys the pixmap given by pixmap and makes its resource identifier available for reuse.
KEYWORDS
pixmap, resource identifier
Tk 4.0 Tk_GetPixmap(3)