How to fill the canvas with lines

< mx:Canvas id = "b1" x = "10" y = "10" height = "40" width = "300" borderStyle = "solid" borderColor = "black" / >

When I want to draw lines with difference of 15 pixels to fill the entire canvas I wrote the following

for (var i: int = b1.x + 15; i < b1.x + b1.width; i = i + 15)
{
var line1:UIComponent = new UIComponent();
var lineThickness1:Number = 1;
var lineColor1:Number = 0 x 000000;
var lineAlpha1:Number = 1;
LINE1. Graphics.LineStyle (lineThickness1, lineColor1, lineAlpha1);
LINE1. Graphics.MoveTo (i, B1.y);
LINE1. Graphics.LineTo (i, B1.y + B1. Height);
this.addChild (line1);
}

It works very well

LLY,

< mx:Canvas id = "b4" x = "600" y = "200" height = "60" width = "300" borderStyle = "solid" borderColor = rotation "black" = "40" / >

I have the canvas above with the "b4" id only difference is that this canvas rotation

How to fill the canvas with lines that I just did above?

Hope this code will help you,

for(var i: int = 15; i < b4.width; i = i + 15) {
     var line1: UIComponent = new UIComponent();
     var lineThickness1: Number = 1;
     var lineColor1: Number = 0x000000;
     var lineAlpha1: Number = 1;
     line1.graphics.lineStyle(lineThickness1, lineColor1, lineAlpha1);
     line1.graphics.moveTo(i, 0);
     line1.graphics.lineTo(i, b4.height - 1);
     //Add line in canvas instead of main container
     b4.addChild(line1);
}


Tags: Flex

Similar Questions

  • How to fill the gaps with data?

    Hello

    I have data points with a header that contains the ID that I have to report to each row of data.

    I want the ID of the Patient to fill the fields below the rank (where the "Obs" and sequential numbers are) until it reaches the next patient id and then do the same thing again and again until the end.

    Is this possible in a single SQL UPDATE statement?

    Thank you, Daniel

    It's data, it's a column:

    Patient ID = system 1000207 = LVS + ZDV + ddI randomization Date = 26/03/2004
    OBS
    1
    2
    3
    4
    5
    6
    7
    Patient ID = regime 1000751 = LVS + d4T + 3TC randomization Date = 25/02/2004
    OBS
    8
    9
    10
    11
    12
    13
    14
    Patient ID = system 1001379 = LVP + d4T + 3TC randomization Date = 17/03/2004
    OBS
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    etc etc.

    Do you have any column order?

    If not, how you will order the data?

    If you have a column for the classification, the described selection will give you the id of the patient in all lines

    select col1,
           last_value(
              regexp_substr(col1,'Patient ID=([0-9]+)',1,1,null,1) ignore nulls
                    )
            over(order by ord_col) s
    from your_table;
    

    You can then use the MERGER based on the ROWID of update...

    Published by: JAC on May 21, 2013 20:18

  • How to fill the text with transparent areas

    I use Adobe Photoshop CC 2015 on Windows 10.  I am trying to create a transparent logo using fonts "Mister Vampire".  The text has some areas transparent I am filling to create a Chrome or gold.

    Here is an example of the police.  Any help is appreciated.

    Text Sample.JPG

    Several ways. You can use the magic wand tool to select the transparent areas in the text: use contiguous, then move click here to make the next letter. You should maybe put a white layer below the sample text and use all layers. Extend selection when done and fill a layer below the text with the desired color.

  • Fill the shape with lines

    I'm really new to illustrator, and I need to know the answer to this question quickly. If I did a weird form with 5 different lines how would I fill? Really, nothing happens when I select the rows, and then select a color.

    Thank you for answering my question

    I'll assume that you used the online tool to make the shape.

    Shape to fill it must be what is called a closed path that you now are five open paths.

    Here's what you can select all the lines and use the command or order J to join the end points and then fill it out.

    But the right way to make the shape you want to do is to use the pen tool.

    More about the pen tool and the tool online and watch videos.

  • How to fill the DataGird with the data returned by the php page?

    Hi, I'm new to Flex, I try to fill DataGrid with data from PHP, my code is

    < mx:HTTPService

    id=" personRequest = URL "result ="getPerson (event)" http://localhost/searchPerson.php " useProxy = ' fake "method =" " POST "

    showBusyCursor ="

    true "resultFormat =" " E4X " >

    < /.

    MX:HTTPService >

    < mx:DataGrid

    id=" searchResult " " dataProvider =" {? what to paste here? } }" y="30"

    >

    < / mx:DataGrid >

    .....

    private

    function getPerson(evt:ResultEvent):Sub { }

    var res: XMLList = evt.result... Dane as XMLList;

    search results =

    new (Res) XMLListCollection;

    }

    ....

    output of PHP

    < person >

    < dane >

    < name > CBA < / name >

    < Street > XLXXLX < / street >

    < / dane >

    < dane >

    < name > DEF < / name >

    < Street > CIWU < / street >

    < / dane >

    < / person >

    If I set the dataProvider as search results "" it doesn't work. I have probably set all collection ArrayCollection as a dataprovider, but I don't know how to convert my XMLListCollection for her.

    Could someone help me complete Datagrid with

    name | Streer

    ABC, XLXXLX

    DEF, CIWU

    Best regards

    Mariusz










    After the datagrid control, you post the above code.

  • How to fill the screen with custom display fields

    I need to instantiate a class of custom field and add it to a number fixed times who knows @ length of the screen.

    I created a table to create objects of a custom field, and then I add elements to the screen one by one.

    I use this code where the entries knows @ runtime.

    There is error but the fields are not added to the screen and the screen and the screen is blank.

    CustomField item[]=new CustomField[entries];
    int entries;
    for(int i=0;i			 

    Some stupid problem just to retrieve the integer. Now, copy the following code works correctly.

  • How to set the keys to line declared with a model of ChildPropertyTreeModel

    I want to initialize my tree with a few nodes already developed. From what I read I have to use the setDisclosedRowKeys method, but I don't know how to create and fill the parameter RowKeySet.

    I was thinking something like this:

    RowKeySet rowKeys = tree.getDisclosedRowKeys ();

    = (ArrayList) model.getWrappedData () ArrayList object.

    TreeItem data = (TreeItem) object.get (0);

    List of children < TreeItem > = data.getChildren ();

    for (TreeItem element: children) {}

    Code to add this element to the RowKetSet

    }

    tree.setDisclosedRowKeys (rowKeys);

    There is a RowKeySet.add () method, but it refers to the current line, and in my case, there is no "current line" concept. Any idea on how to fill the RowKeySet?

    JDev 11.1.1.6.0

    My working solution:

    @Override

    public void expandDefaultNodes() {}

    FacesContext context = FacesContext.getCurrentInstance ();

    RichTree tree = (RichTree) context.getApplication () .evaluateExpressionGet (context, "#{components.tree}",)

    RichTree.class);

    ArrayList<>> newKeys = new ArrayList<>> ();

    RowKeySet disclosedKeys = tree.getDisclosedRowKeys ();

    Object oldkey = tree.getRowKey ();

    tree.setRowKey (null);

    TreeModel treeModel = tree.getValue ((ChildPropertyTreeModel));

    RKS RowKeySet = new RowKeySetTreeImpl();

    rks.setCollectionModel (treeModel);

    rks.addAll ();

    for (k subject: rks) {}

    ArrayList = k (ArrayList) keyAsList;

    First layer

    If (keyAsList.size () == 1) {}

    newKeys.add (keyAsList);

    }

    treeModel.setRowKey (k);

    TreeItem ti = treeModel.getRowData () (TreeItem);

    If (ti.isSelected ()) {}

    for (int i = 1; i)< keyaslist.size();="" i++)="">

    Subkey is used to disclose the parents of the current

    node

    Subkey list = keyAsList.subList (0, i);

    If (! newKeys.contains (subKey)) {}

    newKeys.add (subKey);

    }

    }

    newKeys.add (keyAsList);

    }

    }

    tree.setRowKey (oldkey);

    disclosedKeys.addAll (newKeys);

    AdfFacesContext.getCurrentInstance () .addPartialTarget (tree.getParent ());

    }

  • How to format the text vertical line head

    I have a spreadsheet of list of control with a large number of lines. Since I fill the cells with ✓ or keep them empty I would transform the text of head of line in vertical direction to get the width of the worksheet as small as possible.

    How can I get this format?

    Hi FMW.

    Numbers are not (yet) allow the cells of a table should rotate. Of workaround puts on the header line text boxes.

    See this tip for the user:

    Rotate the contents of the cell to 3 numbers: workaround

    Kind regards

    Ian.

  • Replace the hyphen with line break

    Hello
    In my application, I want to replace the hyphen with line break
    . I use APEX4.0
    I use the following javascript code:

    < html >
    < script type = "text/javascript" >
    function test().
    {
    var visitorName = "< br / > ';
    var myOldString = "& P2_SI.";
    var myNewString = myOldString.replace (/-/ g, visitorName);
    }
    < /script >
    < / html >

    I have no idea how the get executed and make javascript work... can anyone help?

    Suzi,

    I changed the code for page 1:
    I don't know that is what you want, but it works :)
    That's what I did

    1. deleted tags
    2 P1_RESULTS element created to keep results
    3. $x_Value ("P1_RESULTS", myNewString) occasion; to fill a new element

    You cannot set the value P1_S2I in dynamic Action (onchange) - it looks like the code calls herself and kills the browser

    Lev

    Published by: the on August 27, 2010 11:49

    Published by: the on August 27, 2010 11:53

  • to fill the gaps with value of lead and the delay and make average and the gap between earned

    Thanks in advance

    I have table as below
    ID          TYPE     NUM     NAME     BEG_MP     END_MP     VALUE
    10001103N     3     1190001     WST     0.000     0.220     
    10001103N     3     1190002     WST     0.220     0.440     
    10001103N     3     1190003     WST     0.440     0.820     12800
    10001103N     3     1190003     WST     0.820     1.180     12800
    10001103N     3     1190004     WST     1.180     1.220     
    10001103N     3     1190004     WST     1.220     1.300     
    10001103N     3     1190005     WST     1.300     1.420     14800
    10001103N     3     1190005     WST     1.420     1.550     14800
    10001103N     3     1190006     WST     1.550     2.030     
    10001103N     3     1190006     WST     2.030     2.660     
    10001103N     3     1190007     WST     2.660     2.780     
    What I need is to fill the gaps with value of lead and the delay and make average and the gap between the values
    ID          TYPE     NUM     NAME     BEG_MP     END_MP     VALUE
    10001103N     3     1190001     WST     0.000     0.220     12800 ---> Lag value
    10001103N     3     1190002     WST     0.220     0.440     12800 ---> Lag Value
    10001103N     3     1190003     WST     0.440     0.820     12800
    10001103N     3     1190003     WST     0.820     1.180     12800
    10001103N     3     1190004     WST     1.180     1.220     13800 ---> Avg(12800,14800)
    10001103N     3     1190004     WST     1.220     1.300     13800 ---> Avg(12800,14800)
    10001103N     3     1190005     WST     1.300     1.420     14800
    10001103N     3     1190005     WST     1.420     1.550     14800
    10001103N     3     1190006     WST     1.550     2.030     14800 ---> Lead Value
    10001103N     3     1190006     WST     2.030     2.660     14800 ---> Lead Value
    10001103N     3     1190007     WST     2.660     2.780     14800 ---> Lead Value
    create table AVG_TABLE
    (
      ID     VARCHAR2(20),
      TYPE   NUMBER,
      NUM    NUMBER,
      NAME   VARCHAR2(10),
      VALUE  NUMBER,
      BEG_MP NUMBER(6,3),
      END_MP NUMBER(6,3)
    )
    ;
    
    insert into AVG_TABLE (ID, TYPE, NUM, NAME, VALUE, BEG_MP, END_MP)
    values ('10001103N', 3, 1190001, 'WST', null, 0, .22);
    insert into AVG_TABLE (ID, TYPE, NUM, NAME, VALUE, BEG_MP, END_MP)
    values ('10001103N', 3, 1190002, 'WST', null, .22, .44);
    insert into AVG_TABLE (ID, TYPE, NUM, NAME, VALUE, BEG_MP, END_MP)
    values ('10001103N', 3, 1190003, 'WST', 12800, .44, .82);
    insert into AVG_TABLE (ID, TYPE, NUM, NAME, VALUE, BEG_MP, END_MP)
    values ('10001103N', 3, 1190003, 'WST', 12800, .82, 1.18);
    insert into AVG_TABLE (ID, TYPE, NUM, NAME, VALUE, BEG_MP, END_MP)
    values ('10001103N', 3, 1190004, 'WST', null, 1.18, 1.22);
    insert into AVG_TABLE (ID, TYPE, NUM, NAME, VALUE, BEG_MP, END_MP)
    values ('10001103N', 3, 1190004, 'WST', null, 1.22, 1.3);
    insert into AVG_TABLE (ID, TYPE, NUM, NAME, VALUE, BEG_MP, END_MP)
    values ('10001103N', 3, 1190005, 'WST', 14800, 1.3, 1.42);
    insert into AVG_TABLE (ID, TYPE, NUM, NAME, VALUE, BEG_MP, END_MP)
    values ('10001103N', 3, 1190005, 'WST', 14800, 1.42, 1.55);
    insert into AVG_TABLE (ID, TYPE, NUM, NAME, VALUE, BEG_MP, END_MP)
    values ('10001103N', 3, 1190006, 'WST', null, 1.55, 2.03);
    insert into AVG_TABLE (ID, TYPE, NUM, NAME, VALUE, BEG_MP, END_MP)
    values ('10001103N', 3, 1190006, 'WST', null, 2.03, 2.66);
    insert into AVG_TABLE (ID, TYPE, NUM, NAME, VALUE, BEG_MP, END_MP)
    values ('10001103N', 3, 1190007, 'WST', null, 2.66, 2.78);
    commit;

    Hello

    Use LEAD and LAG when you know exactly how far is the target line (for example, if you know the desired value is on the next row).
    If you don't know exactly how far is the target line, then FIRST_VALUE and LAST_VALUE are more likely to be useful.

    WITH     got_neighbors     AS
    (
         SELECT     avg_table.*
         ,     LAST_VALUE (value IGNORE NULLS) OVER (ORDER BY beg_mp)          AS prev_value
         ,     LAST_VALUE (value IGNORE NULLS) OVER (ORDER BY beg_mp DESC)     AS next_value
         FROM     avg_table
    )
    SELECT       id, type, num, name, beg_mp, end_mp
    ,       COALESCE ( value
                 , ( NVL (prev_value, next_value)
                   + NVL (next_value, prev_value)
                   ) / 2
                 )     AS value
    FROM       got_neighbors
    ORDER BY  beg_mp to f
    ;
    

    Riedelme is correct: LAG LEAD (as well as FIRST_VALUE and LAST_VALUE) can return only the values that are there (or that you give as default values). This means that you can not solve this problem with these functions alone; you need something else (as NVL, above) to provide value when the function does not find it.

  • How to fill one shape with another shape, but not of models

    Hello

    How to fill one shape with another shape, but not of models. Example of this poster

    Screen Shot 2015-05-18 at 13.41.33.png

    put in a shape of the tree so that it looks like this:

    Heavy_type_tree.jpg

    Select your type with a vector path, which is the subject

    Object > envelope distort > make with top object.

  • Fill the layer with the color

    pse13 I am filling the layer.  The layer has a small rectangle on it and nothing else.  When I fill the layer, it fills the whole canvas, not only the rectangle!  It's used to work!

    1. Go to file > new > empty file. Type w, h and the resolution, & background color. It's the Web.
    2. Set up the fixed size Rectangle tool, enter w & h dimensions of the rectangle
    3. Use the paint bucket tool to fill the rectangle with the color of choice as determined by the foreground color chip.
  • How to change the Rectangles with buttons

    I'm working on this example that does not work correctly:

    public class test extends Application
    {
    
        private void init(Stage primaryStage)
        {
    
            Group root = new Group();
            primaryStage.setScene(new Scene(root));
    
            String pillButtonCss = DX57DC.class.getResource("PillButton.css").toExternalForm();
    
            // create 3 toggle buttons and a toogle group for them
            ToggleButton tb1 = new ToggleButton("Left Button");
            tb1.setId("pill-left");
            ToggleButton tb2 = new ToggleButton("Center Button");
            tb2.setId("pill-center");
            ToggleButton tb3 = new ToggleButton("Right Button");
            tb3.setId("pill-right");
    
            final ToggleGroup group = new ToggleGroup();
            tb1.setToggleGroup(group);
            tb2.setToggleGroup(group);
            tb3.setToggleGroup(group);
            // select the first button to start with
            group.selectToggle(tb1);
    
            //////////////////////////////////////////
    
            final VBox vbox = new VBox();
    
            final Rectangle rect1 = new Rectangle(300, 300);
            rect1.setFill(Color.ALICEBLUE);
            final Rectangle rect2 = new Rectangle(300, 300);
            rect2.setFill(Color.AQUA);
            final Rectangle rect3 = new Rectangle(300, 300);
            rect3.setFill(Color.AZURE);
    
            tb1.setUserData(rect1);
            tb2.setUserData(rect2);
            tb3.setUserData(rect3);
    
            group.selectedToggleProperty().addListener(new ChangeListener<Toggle>()
            {
                @Override
                public void changed(ObservableValue<? extends Toggle> ov, Toggle toggle, Toggle new_toggle)
                {
                    if (new_toggle == null)
                    {
                        //rect.setFill(Color.WHITE);
                    }
                    else
                    {
                        vbox.getChildren().addAll((Node[]) group.getSelectedToggle().getUserData());
                        //rect.setFill((Color) group.getSelectedToggle().getUserData());
                    }
                }
            });
    
    
            ///////////////////////////////////////////
    
    
            HBox hBox = new HBox();
            hBox.getChildren().addAll(tb1, tb2, tb3);
            hBox.setPadding(new Insets(20, 20, 260, 20));
            hBox.getStylesheets().add(pillButtonCss);
    
    
    
            vbox.getChildren().add(hBox);
            //vbox.getChildren().add(rect);
    
            root.getChildren().add(vbox);
        }
    
        @Override
        public void start(Stage primaryStage) throws Exception
        {
            init(primaryStage);
            primaryStage.show();
        }
    
        public static void main(String[] args)
        {
            launch(args);
        }
    }
    
    
    

    I want to create several Rectangles (or in which object or object) in which I want to store data. I want to spend the Rectangles (objects) that appear in front of the user by using the buttons. The example that I put in place does not work correctly. Can you tell me what is the right way to implement this?

    REF javafx 2 - How to change the Rectangles with buttons - stack overflow

    You have two problems:

    User data that assign you to each button switches are a node, not a [Node]. Thus, the cast will fail on line 43.

    When the selected toggle changes, you add another Rectangle to the vbox. You want to replace the rectangle that is in the vbox.

    Try

    vbox.getChildren () .setAll ((Node) group.getSelectedToggle () .getUserData ());

  • Fill the shape with text

    Whether you have a shape, a triangle and you want to write text inside, if the pile of words on top of each other like a pyramid. Who would you do? When you use the text tool, you can drag a text box, but I want a triangle of text, or a star or another strange form. How to fill a shape with text?

    Why?

    I do not mean to be a five-year-old; I'm asking because there may be a way to get the desired result in a different way.

    For example, if you are wanting to use animations of text, John Dickinson explained how to do this:

    'Export' your Illustrator file in Photoshop (.psd) format.

    Then open the .psd in After Effect in the form of Composition

    Select the text layer and choose layer > convert to editable text.

  • How to replace the paragraph with a space mark

    Hello

    I received the contents of a manual in raster format, but each line of text ends with a paragraph mark. How to replace the paragraph with a mark space otherwise than by hand?

    In Word, this is pretty easy, but I don't see not any provision for it in the search box on 7.2 Frame.

    Yours,

    Michael F

    ========

    \p = end of paragraph

    \P = beginning of paragraph

    See: Help > keyboard shortcuts > keys for the search and replace

Maybe you are looking for