third index

I'm trying to add color to an existing ps C program text. It currently translates a few sequences esc in postscript "cmd" located in a .ps file included for bold/italic and frame...

I added a new cmd for the color, but I'd rather not have 3 RGB values in the C program, but just an index (then translate the index to the RGB values in the included .ps file (which also defines the new cmd)

I have problems with the .ps file included getting just the first RGB value rather than the triplet.

Here is my code ps...

/COLOR_BLACK {0 0 0} def

/COLOR_RED {1 0 0} def

/COLOR_BLUE {0 1 0} def

def /COLOR_GREEN {0 0 1}

/color_mag {0.83 0.83 0} def

/color_dict [color_black color_red, color_green color_mag color_blue] def

/sRGB {color_dict exch get third} bind def

% of use

20 20 moveto

sRGB 0 (black)

1 srgb (red)

Show

showPage

Please show me the error of my ways!

One of the ways to do so:

The courier findfont 12 scalefont setfont

%% here were you definition named procedures that contain each of the three individual digital values, instead of this I made the tables.

% and adjusted/fixed blue, green and magenta.
/COLOR_BLACK [0 0 0] def
/COLOR_RED [1 0 0] def
/COLOR_BLUE [0 0 1] def
/COLOR_GREEN [0 1 0] def
/color_mag [0.83 0.83 0] def

%% Here you define a table called "color_dict" which will now 5 individual objects (berries), instead of 15 values.
/color_dict [color_black color_red, color_green color_mag color_blue] def

%% Here you were using the index directly to point to the first, then second items in the table.

% who were in fact the r and g of your first color values.
% /srgb {color_dict exch get third} bind def

% Here, I'm still using the index to point to the first then the second table objects in the table and obtaining their RGB triplets.
/sRGB {color_dict exch get dup dup 1 get 2 get third exch exch 0 get} bind def

% of use

20 20 moveto
sRGB 0 (black)
% You need a show after black so that the string is displayed in the RGB color that you define before changing the RGB color to red.
Show

1 srgb (red)
Show

2 srgb (blue)
Show

3 srgb (green)
Show

4 srgb (magenta)
Show

showPage

Hope you find it useful!

-Marvin

Tags: Adobe PostScript

Similar Questions

  • Keyboard, audio and low performance with Satellite L50-A-19N index output

    Hello

    I recently bought this laptop and I am very disappointed on the keyboard.

    Construction seems pretty harsh, but typing typing particularly fast, I'm leaving A LOT of (double letters) or letters lack mistypes.

    It seems to me that imperfect contact of the bladder base key.
    I wanted to know if this is normal with this model or is to be retrieved.

    Second disappointment is on the quality of the sound, using IDT pilot the most recent laptop (6.10.6491.0) Web but barebone sounds incredibly ugly.

    I need to activate the audio component DTS which is turned OFF by default, only after the beep for the external speakers seem its listenable, but still not as good and audio of my previous laptop with Realtek HD Audio (about same class).

    Can anyone recommend a better sound improvement or how to reach generally of better sound quality?

    My third disappointment is on the performance of the processor, although he should have the processor i7 (4700MQ), the computer index in Passmark PeformanceTest reached only about 6600-6700 points, while different configurations with the same processor unit reach up to 7900-8000 points.

    I would like to know if that could be a defective unit of CPU in my laptop or is rather caused by other circumstances as more slowly other components.

    Hello

    Until we start to talk about all of your problems, you should post some information like: laptop model and perhaps that the system you are using

    Before that, the details are unknown, its actually not make no sense to talk of possible solution and the solutions.

  • read the elements and index of a table

    Hello

    I use the function buildArray to build a table 1 d of 1024 items.

    Aferwards I want to extract all items + index of all the elements in another goal.

    I mean if e.g. the 1st element of my table is 10, the second is 45, the third is 65 and I want to have (0.10), (1: 45), (2, 65).

    Can you please help me.

    Use a loop FOR.  AutoIndex your table.  Use the table to build inside the loop TO create a table of the index (starting from the terminal i) and your indexed element.  Connect the new array to the output of the loop FOR (again, use autoindexing) to create a 2D array.

  • Detailed index into the array

    Hello!

    I did a VI control card relay and relay settings (eight relay - power) is specified in an array of Booleans. line 1 is the first setting for eight (eight columns, one for each relay) relays and the corresponding digital control gives the time in seconds for this specific relay setting. Line will run two when line 1 is complete, then third row and so on. A user came up with the suggestion; When it has several settings settings as much as 40/lines - it is difficult for him to navigate in the table when he wants to make changes. He suggested I have add a number to each line and also if possible have different markers on each column (for example, colors different lamp for each column). I've attached a picture to show you what I mean.

    My only idea is to use labels, but find it me difficult to do in a generic and dynamic way.

    I am grateful for any suggestions or solutions!

    Best regards

    Mikael - Peterson

    I agree with Saverio.

    Customize a set of Boolean controls using the images you have now.

    Put together them in a cluster

    Place the cluster in a table

    resize the table down

    Right click on the table and hide the index and display the vertical scroll bar.

    When you are finished, you should have a chart every step of the procedure.

    You can add a 'step number' on the cluster to make it easy for what is the step number.

    Ben

  • Replacement after the specified index table

    Hello

    I am completely new to labVIEW as a student. I have a question to overwrite a table once received at a specified index.
    In particular, I have to add up numbers in a table at all times and take the average of the last three values.

    I wanted to make a new table that stores the three numbers and after that, began to replace the first, then the second, the third, first of all, the second you...

    Can someone help me, showing me how to cut my tables up to a limit of 3 values?

    Thanks in advance!

    (Sorry for the bad English)

    To take the average, the order of the array is unimportant. Here's what I'd do.

    (With a little more code, it also works for the first couple of iterations.) See this old post)

    There's also means ptbypt, which does the same thing!

  • How better to insert a subarray (line) in a 2D array to the correct index which is based on the value of the first column

    Hello

    I would like to insert a subarray (line) in a 2D to the correct index table. The position is to say the index value depends on the value of the first column of the table 2d.

    As an examlple my 2d array would look like this

    230 50 215 255

    300 60 270 330

    360 20 350 370

    And I would like to insert another line (subarray) with the following values

    320 40 300 340

    This new line should be placed between the second and third rows (this is based on the first column only).

    I tried the threshold 1 d function table by taking an 1Dsub array of my 2d array (first column), then using the first of the new line (320) as the threshold. It sort of work, but it does not work when I start the table (IE there is only 1 row) and it seems to not work properly on other occasions (as explained in the help of Labview).

    Hopefully the explanation is clear enough for any suggestion. Thanks in advance for the help!

    JTRI wrote:

    The idea is I have start with a new table and add these lines in the right order every time that the user sets the values Jack

    Ahh, so try this.

    This will also work with an empty array.

    You want to do with this function it is a Subvi.

    Make the entries 'table' and 'subarray"on the connector, then 'new array' output.

    You can then put this Subvi in a loop with a registry to shift and it will help to add new lines in a sorted order, when they are added.

    That is what you were aiming for?

  • Same index, indicators of different picture. How?

    Hello world

    I am creating a VI that emulates a spectrum analyzer. At the end of some intermediate steps, I have 3 tables that contain frequency, amplitude and phase for each sample FFT. After I run the VI I want to examine every element of these tables in order to read the actual values for the sample of the i - th (p. ex., frequency, amplitude and phase of the third).

    Now that I use 3 indicators of independent table (as shown in the attached screenshot), however I would like three indices to be synchronized, so that I don't have to type three times the same value every time I want to explore a sample. Is it possible to do?

    I am aware of the block "Array Index", but once the execution ends, I can't go longer through all the samples, indeed when the input signal is noisy values are unstable and it is almost impossible to read in real time (executes the program continuously).

    Thank you very much

    Or combine them into an array of clusters of 3 elements, using "Index and Cluster Array Bundle".

  • How to stop to load at startup of indexing

    I use Win XP Pro, and I want to stop indexing load at startup in my system tray.  I somehow it started about 2-3 weeks ago and now I want to put an end to its use.

    Thanks for any help.

    If it's the windows index service you can turn it off via the admin tools Control Panel.
     
    If it's a third party indexing service, you may need to disable the program by clicking on the Start button > run > msconfig > Startup tab
     
     
     

    --
    db·´¯`·...¸><)))º>

    .

    "JHL1951" wrote in message news: e8e61b15-0624-44 CF-a54d-0e41cf3de646...

    I use Win XP Pro, and I want to stop indexing load at startup in my system tray.  I somehow it started about 2-3 weeks ago and now I want to put an end to its use.

    Thanks for any help.

    DB·´¯'·.. ¸ >-))) º > ·´¯'·.. ¸ >-))) º > share nirvana mann

  • CHKDSK in windows xp hangs at 0% when the index checking, but eventually ends. Why it suddenly runs so much slower than before? Thank you.

    Once I got this error message after 3-4 were revealed when checking indexes scene: "an unexpected error has occurred...". ». At that time there chkdsk stopped and I had to close the window.

    Test the hard drive with a diagnostic utility downloaded from site of the disc mftr. or use SeaTools for BACK of Seagate. You create a bootable CD with the files you download. You will need a third party burning software to do as the free ImgBurn, Nero or Roxio. Burn as an image, not in the form of data.

    http://www.ImgBurn.com

    http://www.Seagate.com/www/en-us/support/downloads/SeaTools/seatooldreg
    http://Seagate.custkb.com/Seagate/CRM/selfservice/search.jsp?docid=201271 (how-to)

    Boot with the CD that you have done and do a full test of the reader. The physical tests fail, replace it. MS - MVP - Elephant Boy computers - don't panic!

  • I get no answer to by clicking "Edit" in the dialog box indexing options. ;

    original title: indexation of dialog options change

    I recently followed instructions from this forum on the removal of invalid index locations; I have rebuilt the index. Unfortunately, an external drive that had been indexed throughout without asking me, is not be indexed now.  When I followed the instructions from Microsoft on the addition of the search location, I get no answer to by clicking "Edit" in the dialog box indexing options. ; nothing happens.

    Help!

    Hello

    Method 1: Let flow the fixit available in the link below and then check

    Fix Windows Search when it crashes or shows no results

    http://support.Microsoft.com/mats/windows_search/en-us

     

    Method 2: If a Protection of resources Windows (WRP) file is missing or is damaged, Windows may not behave as expected. Auditor of file system (CFS) scan to fix all of the corrupted system files. To do this, follow the steps mentioned in the link below:

    How to use the System File Checker tool to fix the system files missing or corrupted on Windows Vista or Windows 7

    http://support.Microsoft.com/kb/929833

     

    Method 3:  Select the boot and then check if the problem persists

    Follow step 1 in the link below,
    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    If everything works well after a clean boot, you can deduce that some third-party services are at the origin of the problem.

    Continue with the remaining steps to pin-point on the third party service.

    After find you the program that is causing the problem, you will have to perhaps to update or install a newer version of the program, if you rarely use that you should consider uninstalling the software.

    Important: n ' forget not to put the computer to a normal startup follow step 7 in the link.

  • Windows Experience Index problem: could not measure the performance of video playback

    My pc is not yet rated. When I click on rate appears on this computer, a msg error saying that Windows Experience Index for your system could not be calculated, could not measure the PERFORMANCE of VIDEO PLAYBACK. What should I do. Help, please

    Hello

    Here are a few things to check before launching performance index Windows (WEI).

    • Quit all running programs, and restart the computer before running the assessment (WEI).
    • Check with the manufacturer of the computer or the motherboard manufacturer for BIOS updates.
    • Make sure you have the latest Windows 7 compatible drivers for the graphics device installed (video card).
    • If you have any third-party media players installed, uninstall them until the end of the evaluation of the WEI.
    • If you have installed any third-party Media Codecs, try to uninstall them until the end of the evaluation of the WEI.

    Open Windows Explorer and navigate to the folder C:\WINDOWS\Performance\WinSAT .

    You should see the following 8 videos.

    2 files with .mp4 extension.

    3 files with the .mpg file extension.

    3 files with .wmv file extension.

    Double-click each of these files. They should open and play in Windows Media Player. These are the files that WEI runs video performance.

    One thing to remember is that the WEI score is only an indicator of the ability of the main components of hardware on the computer. It has no effect on the performance of the system.

    Tell us what you find.

    Concerning

  • Tab File Types in Advanced Options on Indexing Options may not be used.

    When I go to control panel / Indexing Options / Advanced and click on File Types the hangs of demand for ten seconds then Indexing Options and advanced screens both close - no warnings or errors. I tried to rebuild the index, and I also tried to delete all locations with the option change. Any suggestions?

    Hi D-Man,
     
    1. what exactly are you trying to accomplish in indexing option?
    2. have you tried to search running and solving problems of indexing?
     
    Method 1:
     
    If you have not run the tool for indexing and search, I suggest you to run and check for the issue.
     
    Reference:
     
    Open the troubleshooter for search and indexing
    http://Windows.Microsoft.com/en-us/Windows7/open-the-search-and-indexing-Troubleshooter
     
    Method 2:
     
    Step 1:
     
    Try in safe mode.
     
     
    Step 2:
     
    If the problem does not happen, I recommend you perform the clean boot.
     
    Put your boot system helps determine if third-party applications or startup items are causing the problem. If so, you need to maybe contact the manufacturer of the program for updates or uninstall and reinstall the program.
     
    See the following article in the Microsoft KB for more information on how to solve a problem by performing a clean boot in Windows Vista or Windows 7:
     
    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7
    http://support.Microsoft.com/kb/929135 
     
    Note: After troubleshooting, be sure to set the computer to start as usual as mentioned in step 7 in the above article.
     
    Step 3:
     
    If the problem happens again then in safe mode, try scan sfc.
     
    SFC/scannow is a very useful command that you can use in any version of Windows. When the SFC (System File Checker) command is used with the/scannow switch, the tool analyzes all the important files of Windows on your computer and replace if necessary.
     
    Missing and the corruption of the operating system (like many DLLs) files are probably the main cause of the major problems of Windows. In view of this, plus the fact that the SFC /scannnow is completely automatic and very easy to use, the tool should be usually one of your top not troubleshooting.
     
    How to use the System File Checker tool to fix the system files missing or corrupted on Windows Vista or Windows 7
    http://support.Microsoft.com/kb/929833
       
    You can also use Event Viewer to search for information on the problem.
         
    Here is an article on how to do it:
          
    The display of the error messages in the event viewer
    http://support.Microsoft.com/kb/947321
          
    You can see for more information on the issue at the time where it occurred.

        
    You can post this information here to help us narrow down where the focus.
         

    Thank you, and in what concerns:
    I. Suuresh Kumar - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Torch blackBerry Smartphones blackberry stolen. I put the phone to the index. But my pin code is in use?

    I lost my torch from blackberry to the University last month. I contacted my network provider and they put the phone to the index. However, my friends recently told me that my PIN is now underway to use with a different view of the image and the personal message. Therefore, I can only assume that they unlock the phone by changing the IMEI (which is illegal). Is there a way I can track my phone using my pin code. I still have a proof of purchase, including the box with the IMEI and the BBM pin on that number. I have not previously installed any software on the phone. All answers are appreciated

    If you have no third-party tracking software, such as the free BlackBerry Protect not average follow-up and recovery of your phone installed on your phone, you have.  Of course, your carrier may do if you provide your PIN (and perhaps the IMEI as well), but they won't.   Contacting them and the suspension of the SPINDLE should do the trick there.  I'd get back on the phone with them about what is (or was not) fact.

    I hope that helps you.

  • Untrapped exception blackBerry Smartphones: index 11 &gt; 11 &amp; Eception exception: ApplicationRegistry.getorWaitFor

    Exception: ApplicationRegistry.getorWaitFor (0x7c802477365c3985) uncaught owner died Thread [Thread - 77 Q 62848, 5] turned into Eception exception: Index 11 > 11 which also goes to a white screen that says AppError 523 Reset.  Can anyone give me any help on how to clear this?  Via the Desktop Manager, I managed to remove third-party applications to the phone, but I couldn't save or delete and restore the operating system.  Can someone offermesome tips on what do I do?

    Hey Shamed74,

    Welcome to the forums.

    The first thing you want to do is to try to back up your device as shown in this article. http://bit.LY/aSediX Once you do this, then you can try a factory reset on the device as described here http://bbry.lv/a0QXmX if you are not able to get a backup copy, then it would be up to you if you want to try the rest at the factory as it will completely erase everything off the device and bring it back to factory settings.

  • I have windows 7 64 bit and cannot get my search running index.

    I tried option evey on every thread here, and search for google, including the verification of registry keys, checking and unchecking options based on windows, etc, etc, etc...  When I click I have no tab file types that everyone refers to advanced options, also cannot use the change because it is grayed out, please help?  Have also tried to create the new user account and get the same results.  I'm at my wits end!

    Hi patricelaurence,

    Thanks for posting the question on Microsoft Community Forums.
    Description of the question, we understand that this index does not.
    We will try to help you solve the problem.
     
    Here are some steps that you can follow:
     
    Method 1:
    Open the troubleshooter for search and indexing
     
    Method 2:
    We recommend that you perform the clean boot.
    Put your boot system helps determine if third-party applications or startup items are causing the problem.
    Consult the following link:
    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7
    http://support.Microsoft.com/kb/929135
    Note: See "How to reset the computer to start as usual after a clean boot troubleshooting"
    under more information to prepare the computer to start as usual after a repair.
     
    Method 3:
    Try disabling the security on your computer program and check whether the problem is resolved.
    See the link below for assistance:
    http://Windows.Microsoft.com/en-in/Windows7/disable-antivirus-software
    Note: After checking the question you must reactivate the security on your computer program.
    Using third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.
     
    Hope this solves the problem. If the problem persists, you can write back to us and we will be happy to help you further.

Maybe you are looking for

  • Update for Tecra M5 wireless LAN

    Hello I downloaded the latest driver lan wireless Tosh, version 12.4.0.21.1 and expanded the zip to my Tecra M5, PTM51E. When I double-click on setup.exe, I get an hourglass for a second and nothing more. Someone has an idea what may prevent the prog

  • Re: Passing the record reader user C to E drive Satellite L40 - 17U

    Hello The HARD disk is partitioned with the 'C' drive users and any system/vista files. C drive now more complete. Many tried to copy the user folder on disk 'E' with only partial success. Want to remove c altogether and switch to E - in order to sep

  • continous fax

    OfficeJet Pro 8600 keeps trying to send the same fax.  How can I stop it. Disconnected the telephone line, but he keeps trying

  • conversion windows 7 Spanish English

    I just bought a computer with windows 7 in spainsh... is possible to convert it into English?

  • Wireless 6500 printer

    I have a wireless 6500 printer. I am running windows 8 preview version. I noticed that hp put an update for full installation, I could use any printed copy and scan. How ever when I go to install it through ok except at the end and gives me an error.