Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mdraw_coordinates_position(3m17n) [debian man page]

mdraw_coordinates_position(3m17n)				 The m17n Library				 mdraw_coordinates_position(3m17n)

NAME
mdraw_coordinates_position - Return the character position nearest to the coordinates. SYNOPSIS
int mdraw_coordinates_position (MFrame * frame, MText * mt, int from, int to, int x_offset, int y_offset, MDrawControl * control) DESCRIPTION
Return the character position nearest to the coordinates. The mdraw_coordinates_position() function checks which character is to be drawn at coordinate (x, y) when the text between from and to of M-text mt is drawn at the coordinate (0, 0) using the mdraw_text_with_control() function with the drawing control object control. Here, the character position means the number of characters that precede the character in question in mt, that is, the character position of the first character is 0. frame is used only to get the default face information. RETURN VALUE
If the glyph image of a character covers coordinate (x, y), mdraw_coordinates_position() returns the character position of that character. If y is less than the minimum Y-coordinate of the drawn area, it returns from. If y is greater than the maximum Y-coordinate of the drawn area, it returns to. If y fits in with the drawn area but x is less than the minimum X-coordinate, it returns the character position of the first character drawn on the line y. If y fits in with the drawn area but x is greater than the maximum X-coordinate, it returns the character position of the last character drawn on the line y. COPYRIGHT
Copyright (C) 2001 Information-technology Promotion Agency (IPA) Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST) Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License <http://www.gnu.org/licenses/fdl.html>. Version 1.6.2 12 Jan 2011 mdraw_coordinates_position(3m17n)

Check Out this Related Man Page

mdraw_per_char_extents(3m17n)					 The m17n Library				     mdraw_per_char_extents(3m17n)

NAME
mdraw_per_char_extents - Obtain per character dimension information. SYNOPSIS
void mdraw_per_char_extents (MFrame * frame, MText * mt, MDrawMetric * array_return, MDrawMetric * overall_return) DESCRIPTION
Obtain per character dimension information. The mdraw_per_char_extents() function computes the text dimension of each character in M-text mt. The faces given as text properties in mt and the default face of frame frame determine the fonts to draw the text. Each successive element in array_return is set to the drawn metrics of successive characters, which is relative to the origin of the drawing, and a rectangle for each character in mt. The number of elements of array_return must be equal to or greater than the number of characters in mt. If pointer overall_return is not NULL, this function also computes the extents of the overall text and stores the results in the members of the structure pointed to by overall_return. COPYRIGHT
Copyright (C) 2001 Information-technology Promotion Agency (IPA) Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST) Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License <http://www.gnu.org/licenses/fdl.html>. Version 1.6.2 12 Jan 2011 mdraw_per_char_extents(3m17n)
Man Page

11 More Discussions You Might Find Interesting

1. Programming

X Windows Programming: Changing Displays

I currently have an application that requires the GUI to be drawn on 3 different machines. Only 1 machine is to be drawn at a time, but can be switched between them at any time. Is there an easy way to do this during runtime aside from creating 3 sets of widgets and updating them all. I am... (1 Reply)
Discussion started by: bkowal
1 Replies

2. UNIX for Advanced & Expert Users

Counting position of a character

Hi All, I have a file of the format : idsfskjvfdznvdfjvh ierwjfkncmvlkmc xszkmdvnosndzjndf weuhrndzierfncv rndsjnsllshens iernzkfndslkdhf zkinewfinfvlkmvd I wish to count the occurrences of character 'z' in the file. I also need to find out the position of 'z' in various lines. and... (3 Replies)
Discussion started by: rochitsharma
3 Replies

3. UNIX for Dummies Questions & Answers

Replacing a character in a line

Hi All I want to replace a character in a line, but position will be different form one iteration to another. So i m keeping the position i a variable. I am trying with following code pos=3 echo "Hello World, Good Morning" | sed 's/\(.\{$pos\}\)./\1Y/' But its not working, Can you... (2 Replies)
Discussion started by: Usha Shastri
2 Replies

4. Shell Programming and Scripting

Breaking a file into three new files, character by character

I am new to shell scripting, and need a script to randomly distribute each character from a file into one of three new files. I also need each character to maintain it's position from the original file in the new file (such that if a character is written to File 1, Files 2 and 3 have spaces... (10 Replies)
Discussion started by: foxcastle
10 Replies

5. Shell Programming and Scripting

How to read one character form each line of the file?

Hi, Maybe this iscorrect forum for my question... I should read one character at a fixed position from each line of the file. So how ??? should be substituted in the code below: while read line ; do single_char=`???` echo "$single_char" done < $input_file OK...I did get an... (0 Replies)
Discussion started by: arsii
0 Replies

6. Shell Programming and Scripting

Extract a character specifying position

hi , i am having a file Full_ARTMAS_20110510152425.xml in my local directory. i wanted to extract the character at the 35143546 th position at line 1 of this file.Can any body help me how to do it??? regards Anjali (2 Replies)
Discussion started by: angel12345
2 Replies

7. UNIX for Dummies Questions & Answers

Need help removing last character of every line if certain character

I need help removing the last character of every line if it is a certain character. For example I need to get rid of a % character if it is in the last position. Input: aaa% %bbb ccc d%dd% Output should be: aaa %bbb ccc d%dd I tried this but it gets rid of all of the % characters.... (5 Replies)
Discussion started by: raptor25
5 Replies

8. Shell Programming and Scripting

control M character in unix file

in a file we are getting control character in a file , is there any way that they can be removed once we have the file for eg. BEGIN-PROCEDURE INITIALIZE ^M LET #row_count = 0^M ^M ^M (2 Replies)
Discussion started by: lalitpct
2 Replies

9. Shell Programming and Scripting

Formatting file data to another file (control character related)

I have to write a program to read data from files and then format into another file. However, I face a strange problem related to control character that I can't understand and solve. The source file is compose of many lines with such format: T_NAME|P_NAME|P_CODE|DOCUMENT_PATH|REG_DATE ... (3 Replies)
Discussion started by: hk6279
3 Replies

10. Shell Programming and Scripting

awk Help - Comparison Operator problem

Hi, I've tried searching through the forum but I've drawn a blank so i'm going to post here. I'm developing a number of checks on a CSV file, trying to find if any are greater than a max limit. I'm testing it by running it from a command line. The file I'm testing has 8 records. When I... (3 Replies)
Discussion started by: Tmart
3 Replies

11. Shell Programming and Scripting

awk to insert new line conditionally

Dear All, I have a file like: If $4=2001, a duplicated line will be inserted and $4 will be assigned value 2011; so that the new file would be: How to write awk to accomplish this? thank you very much! (5 Replies)
Discussion started by: littlewenwen
5 Replies