Affine transform problem

I am trying to scale the size of an image but it doesn t work
could you help me please?
thanks
public void paintComponent(Graphics g) { //called Whenever panel needs
              Iterator<Shape> it = shapes.iterator(); //Iterate through Balls calling
                    if(Menu.geSelection()<=6 )
                        g.setColor(Menu.getColor());
                        g.fillRect(0, 0, this.getWidth(), this.getHeight());
                    else
                        try
                                bi = ImageIO.read(file);
                                //creating the AffineTransform instance
                                AffineTransform affineTransform = new AffineTransform();
                               affineTransform.scale(22, 22);
                                g.drawImage(bi, 0, 0, null);
                                catch (IOException ex)
                                    Logger.getLogger(ShapePanel.class.getName()).log(Level.SEVERE, null, ex);
                while (it.hasNext()) { //each one's paint method
                     it.next().paint(g);
     }

bi = ImageIO.read(file);
                                //creating the AffineTransform instance
                                AffineTransform affineTransform = new AffineTransform();
                                bi.createGraphics();
                                affineTransform.scale(22, 22);
                                Graphics2D g2 = (Graphics2D) g;
                                g2.setTransform(affineTransform);
                                g.drawImage(bi, 40, 0, null);

Similar Messages

  • Problem: Scalable canvas with affine transformation

    I'm trying to create a canvas that can be scrolled and is scalable through affine transformations. This, I'm trying to achieve by adding a control component to an existing Canvas that listens for MouseEvents and masks the area outside the area defined by the canvas when the control component is created. The base for this component was http://gasi.ch/blog/zooming-in-flash-flex/.
    Next I'm explain how the component is supposed to work and then on to the problem.
    This is how the canvas is created. In the constructor MouseListeners and a mask canvas is added to dragCanvas.
              var canvasControl:MatrixCanvasMouseControl = new MatrixCanvasMouseControl(dragCanvas);
    The listeners work pretty much the same way as in the link I mentioned earlier. So on to the scaling which is the problem.
    The scaling is done by first scaling the dragCanvas with method scaleAt(...):
    /** START OF MOUSE WHEEL LISTENER */
              // CUT
              // get the mouseevent position in stage
              var eventStagePoint:Point = new Point();
                        eventStagePoint.x = event.stageX;
                        eventStagePoint.y = event.stageY;         
              // scale dragCanvas at that point with scaleAt
              scaleAt(canvas, zoomIn, zoomIn, canvas.globalToLocal(eventStagePoint).x, canvas.globalToLocal(eventStagePoint).y);       
              // CUT
    /** END OF MOUSE WHEEL LISTENER  */
             * Scales the matrix through affine transformation.
            public static function scaleAt(sprite:Sprite, scaleX:Number, scaleY:Number, originX:Number, originY:Number):void
                var translateMatrix:Matrix = sprite.transform.matrix;
                // move to origo to preserve form
                translateMatrix.translate(-originX, -originY);
                // scale the matrix
                translateMatrix.scale(scaleX, scaleY);
                // move back to originX, originY
                translateMatrix.translate(originX, originY);
                sprite.transform.matrix = translateMatrix;
    This scales the maskCanvas also. Next I'm trying to scale the maskCanvas back to it's original position by:
              MatrixHelper.scaleAt(maskCanvas, (1 / zoomIn), (1 / zoomIn), maskCanvas.globalToLocal(eventStagePoint).x * (1 / zoomIn), maskCanvas.globalToLocal(eventStagePoint).y * (1 / zoomIn));
    The problem is that when the Canvas is scaled, the mask  changes it's position when I try to scale it back to it's original size and position (as it's size and position changed when dragCanvas was scaled because maskCanvas is a child of dragCanvas).
    This might not be the best way to achieve scrolling. I also thought about extending Canvas and creating a parent Canvas that would contain dragCanvas and maskCanvas as it's children. That way scaling one would not affect the other. The problem with this was that I didn't find a way to do that without overriding Canvas functionality. If anyone knows and could explain how this could be done effectively for example by "decorating" it would be great.
    I would really appreciate if anyone could help me with this. I've struggled with it for quite a few hours already.
    I know I haven't explained everything clearly, so, please, ask me to clarify things more, if this was not understandable.
    Message was edited by: Kimmo Jokinen
    Message was edited by: Kimmo Jokinen

    OK, I found a hacky solution to my problem by going through every rawChildren of the canvas and then scaling it if it's id didn't match with the one I created in the mouseControl component.
    This does not seem like a very elegant way but at least it works.
    I'm pretty sure that this should be done whole differently architecturally but I'm not experienced enough to find that way.
    So this is how I did it.
    for (i = 0; i < canvas.rawChildren.numChildren; i++) {
         child = canvas.rawChildren.getChildAt(i) as Object;
         if (!child is DisplayObject) {
              continue;
         transformAllowed = false;
         displayChild = DisplayObject(child);
         if (displayChild.hasOwnProperty("id") && (displayChild["id"] == "maskCanvas" || displayChild["id"] == "mouseControlArea")) {    
              transformAllowed = false;                                   
         } else {
              transformAllowed = true;
         if (transformAllowed) {
              MatrixHelper.scaleAt(displayChild, zoomOut, zoomOut, canvas.globalToLocal(eventStagePoint).x, canvas.globalToLocal(eventStagePoint).y);

  • Affine transformation in creation of S-box(AES)

    hi,
    I am trying to implemeant a toy version of AES. I am working on bits(instead of bytes) of 64.
    I am unable to do affine transformation on

    Not a Java question. You might try posting to sci.crypt on Usenet: http://groups.google.com/group/sci.crypt/search?q=AES+S-boxes&

  • DSO transformation problem

    Hi ,
    Can any one give me the some hints for the follwoing two problems..
    1) I have one original DSO (NAME A) and created new DSO (NAME B) copy of the A. Both structures and fields are same.
    While creating transformationsbetwen A and B, one field is missing from source DSO (A). but that field is available in DSO A and B. In transformations iam not able to see in souce DSO. Any suggessions..on this..?
    2) DS in R/3 2LIS_!!_VAHDR having some fileds.all those fields are based on the table VBUK...
         While extracting data or looking data in he table VBUK  field AEDAT (Changed on) is empty... Even though i was created new sales document and chaned that sales document..
    when it will be filled AEDAT filed in VBUK field..? which change is this..?
    Thnaks
    BK

    Hi,
    1) NO it is not 0recode mode... It is 0rate type. It is in DSO A .But in transformation it is missing to map with DSO B 0rate_type.(DSO B is copy of DSO A)
    2) I did changes to the sales document(Changed the qty and saved) ,but even after that also it is empty.Same changes i can get it from other VBAP and AK tables .but i need from VBUK table AEDAT field. Is this field capturing those changes ..? or any other changes it will sve in aedat..?
    Thanks
    BK

  • File Sender Adapter transformation problem

    Hi everyone,
      I have a problem tha might be quite simple to solve but I'm completely lost And some help would be apreciated
      We have an "File -> RFC -> File" scenario implemented using BPM, in our case the file is already in an XML format and we dont have control on the creation on that file, some old application generates it. The problems is that no matter if we build the data type or if we use an external definition, PI always adds the namespace to the message using the tag xmlns:ns0="namespace...." and in our case the when we test the interface is expecting something like this:
    If we tests with the original file PI triggers an Mapping Error, in fact, if whe load the file in the mapping test section at design time we can reproduce the error. When we change the file format mannualy and we just add the "ns0" and the attribute xmlns:ns0="Some namespace....." it works just fine. The problem is that we cannot change the program that generates the files and I don´t have any clue on how to solve this on PI side. We don't know which should be the approach.. content transformations in the CC, XSLT, or create an VBS at operating system level to change all the files before PI runs, etc...
    Any ideas would be very helpful.
    Gustavo Balboa

    Hi Gouri,
      I was sure that would be a very simple solution jejejeje..... thank you very much. You were right. I just remove the namespace of the data type, and now is working just fine.
      I always use the namespace and I thougth that was mandatory always because in the repository the field is marked as mandatory...
      Again, thank you!
    Best Regards
    Gustavo Balboa

  • XSLT Transformation problem

    Hi,
    hope anybody can help.
    I try to transform a object to another object via XSLT transformation.
    Here is my coding :
      DATA: wa_transformation TYPE y0dpl_structures.
      DATA: obj_import TYPE abap_trans_srcbind_tab,
            wa_import TYPE abap_trans_srcbind.
      DATA: obj_export TYPE abap_trans_resbind_tab,
            wa_export TYPE abap_trans_resbind.
      DATA: obj_data TYPE REF TO data.
    * Get transformation data
      SELECT SINGLE *
      INTO wa_transformation
      FROM y0dpl_structures
      WHERE filetype = i_file_type.
    * Create table with internal structure
      CREATE DATA e_data TYPE (wa_transformation-structure_name).
      wa_import-name = 'IMPORT'.
      GET REFERENCE OF i_data INTO wa_import-value.
      APPEND wa_import TO obj_import.
    * Call transformation
      CALL TRANSFORMATION (wa_transformation-transformation)
      SOURCE (obj_import)
      RESULT (obj_export).
    i_data is a import parameter from type "ref to data".
    My problem is, that "Call transformation" makes a shortdump when calling them.
    Regards,
    Anton

    Found a solution for my problem. Now it works!
      DATA: wa_transformation TYPE y0dpl_structures.
      DATA: obj_import TYPE abap_trans_srcbind_tab,
            wa_import TYPE abap_trans_srcbind.
      DATA: obj_data TYPE REF TO data.
      DATA: wa_return TYPE bapiret2.
      FIELD-SYMBOLS: <data> TYPE ANY TABLE.
    * Get transformation data
      SELECT SINGLE *
      INTO wa_transformation
      FROM y0dpl_structures
      WHERE filetype = i_file_type.
      IF sy-subrc IS INITIAL.
    * Create table with internal structure
        CREATE DATA e_data TYPE STANDARD TABLE OF (wa_transformation-structure_name).
        ASSIGN i_data->* TO <data>.
        wa_import-name = 'IMPORT'.
        GET REFERENCE OF <data> INTO wa_import-value.
        APPEND wa_import TO obj_import.
    * Call transformation
        CALL TRANSFORMATION (wa_transformation-transformation)
        SOURCE (obj_import)
        RESULT export_data = e_data.
      ELSE.
        MOVE:  'Y0_DPL' TO wa_return-id,
               'E'      TO wa_return-type,
               '108'    TO wa_return-number.
        APPEND wa_return TO e_return.
        CLEAR: wa_return.
      ENDIF.

  • Xsl/stylesheet transformation problem in soap response(usinf xmlx-tags.tld)

    Hi,
    I have problem in transforming the soap response using xmlx-tags.tld.....
    I was not able to read the <EmpName> value from the returned xml...
    The stylesheet / xsl does not return any elements if I use other then "/" in match
    attribute : <xsl:template match="/">
    here is my soap call and stylesheet in JSP:
    <x:xslt media="html">
    <x:xml>
    <ws:soap ttl="360000">
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    ... making soap call here...
    </soap:Body>
    </soap:Envelope>
    </ws:soap>
    </x:xml>
    <x:stylesheet media="html">
    <xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
    <xsl:output method="xmll" omit-xml-declaration="no"
    doctype-public="-//W3C//DTD HTML 4.0 Transitional//EN" indent="yes" />
    <xsl:template match="GetEmpResult">
    <html>
    <body>
    Result: <B>Symbol <xsl:value-of select="EmpName"/></B>
    </body
    </html>
    </xsl:stylesheet>
    </x:stylesheet>
    </x:xslt>
    the SOAP response looks like this:
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <GetEmpResponse xmlns="http://ws.cdyne.com/">
    <GetEmpResult>
    <EmpID>string</EmpID>
    <EmpName>string</EmpName>
    <SalAmount>decimal</SalAmount>
    <Error>boolean</Error>
    </GetEmpResult>
    </GetEmpResponse>
    </soap:Body>
    </soap:Envelope>
    I tried all the possibilities of template matches, but not succeeded....
    Can somebody help me the correct <xsl:template> to access EmpName from the above
    SOAP responses...
    regards
    Vijay

    Hi,
    Dynamic xslt are not quite supported in OSB, there are some approaches that may be helpful for your case though...
    Have a look at these...
    http://atheek.wordpress.com/2011/12/21/using-xalanevaluate-to-parametrize-xpath/
    http://beatechnologies.wordpress.com/2010/12/01/dynamic-xquery-in-oracle-service-bus/
    Let me know how you go...
    Cheers,
    Vlad

  • Xslt transform problem on Sun AS 8PE

    Hi,
    I have following xslt:
    <xsl:call-template name="CustomerFilter">
    <xsl:with-param name="custFilterPath" select="CustomerFilter"/>
    </xsl:call-template>
    <xsl:template name="CustomerFilter">
         <xsl:param name="custFilterPath"/>
         <xsl:text>Customer filter: </xsl:text>
         <strong>
              <xsl:value-of select="$custFilterPath/Type/text()"/> - <xsl:value-of select="$custFilterPath/Name/text()"/>
         </strong>
    </xsl:template>
    I have following xml :
    <CustomerFilter id="0" idDb="0">
    <Name>All</Name>
    <Type>All</Type>
    </CustomerFilter>
    I perform a server xml-xslt tranform to html using xalan 2.5.2 on tomcat5.0.x server with following code without any errors:
    TransformerFactory tf = TransformerFactory.newInstance();
    tf.setURIResolver(new ServerURIResolver(server_url));
    Transformer t = tf.newTransformer(new StreamSource(stylesheet));
    t.setOutputProperty(OutputKeys.INDENT, indenting);
    t.setOutputProperty(OutputKeys.ENCODING, encoding);
    t.setParameter("server_url", server_url);
    t.transform(new DOMSource(response_doc), new StreamResult(response_stream));
    But when I deployed the code on Sun App Server Update1 I get following error:
    [#|2004-10-25T11:54:48.757+0200|SEVERE|sun-appserver-pe8.0.0_01|javax.enterp
    rise.system.container.web|_ThreadID=13;|StandardWrapperValve[xmlgate]:
    Servlet.service() for servlet xmlgate threw exception
    javax.xml.transform.TransformerException: java.lang.RuntimeException:
    Invalid conversion from 'reference' to 'java.lang.String'.
    at
    org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:6
    44)
    at
    org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:3
    17)
    at
    the last line of sample code
    This code ran without any problems on Sun AS 7 (with Xalan 2.3.1_01).
    I don't know why it's not working. Can anybody help me?
    Thank you,
    Miro

    Actually Xalan version shipped with AS 8.0 is Xalan 2.5.2 + bugfixes. So it is possible that slightly different version might have gone into Tomcat but i am not sure here.
    So it would be good to know, how are you making sure that the same Xalan version is used with AS 8.0 or Tomcat ?
    Best Regards

  • ABAP XML transformation problem

    Hi all,
    I am creating an XML based on a custom transformation I have made. The problem I have is that my variables type P decimals 2 are passed to the XML with just one decimal place, but I need two decimal places.
    I was investigating and SAP documentation says that it should be passed with 2 decimal places according to the conversion, however it is not working in my case.
    The only solution I found is making those variables type C, but I really want a solution that allows me keep my fields as type P.
    Thanks in advance

    Hi,
    That's strange, it works well on my computer. I guess you should check SAP notes or contact SAP support.
    Sandra

  • Java transform problem - resulting XML has wrong namespace on imported Node

    I use Document.importNode(Node, String) to import a node from one document into another document. I want to preserve the namespace of the imported node. This works ok if the imported node specifies xmlns, even xmlns="". But if the imported node does not specify a namespace, I would expect the resulting serialized XML to have xmlns="". However, this is not the case. I use javax.xml.transform.Transformer when I serialize the XML. After the transform, the imported node has the namespace of the document it is imported into, which we do not want. So how do I get the imported node to serialize out with xmlns="", even if it's not specified in the source document? I am using javax.xml.transform.* and javax.xml.parsers.DocumentBuilder from Java 1.4.2.
    Example of XML that node is imported into (imported node replaces PayloadPlaceHolder):
    <?xml version="1.0" encoding="UTF-8"?>
    <Envelope envelopeVersion="0.0.0" classificationLevel="Unclassified" xmlns="http://disa.gcss.mil/XMLGateway/Envelope">
    <Header>
    <UID>GM0000001</UID>
    <DateTime>2006-12-05T16:11:50Z</DateTime>
    </Header>
    <Status reason="FAILED" lastTransactionID="9999999999" inReplyTo="ZZZ9999999999">
    <LastMessageUID>ZZZ9999999999</LastMessageUID>
    </Status>
    <Payload>
    <PayloadPlaceHolder>
    </PayloadPlaceHolder>
    </Payload>]
    </Envelope>
    Example of XML with null namespace, test_segment is imported node:
    <?xml version="1.0" encoding="UTF-8"?>
    <test_segment>
    <name>test</name>
    </test_segment>
    Example of result XML with imported node (test_segment):
    <?xml version="1.0" encoding="UTF-8"?>
    <Envelope classificationLevel="Unclassified" envelopeVersion="0.0.0" xmlns="http://disa.gcss.mil/XMLGateway/Envelope">
    <Header>
    <UID>GM0000001</UID>
    <DateTime>2006-12-05T16:11:50Z</DateTime>
    </Header>
    <Status inReplyTo="ZZZ9999999999" lastTransactionID="9999999999" reason="FAILED">
    <LastMessageUID>ZZZ9999999999</LastMessageUID>
    </Status>
    <Payload>
    <test_segment>
    <name>test</name>
    </test_segment>
    </Payload>
    </Envelope>
    Here is the code to build the documents and transform the XML:
         Document document = null;
    Document dataBlockDoc = null;
    ByteArrayInputStream inStream = new ByteArrayInputStream
    (StringUtils.getBytes(xml.toString()));
    try {
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    dbf.setNamespaceAware( true );
    DocumentBuilder parser = dbf.newDocumentBuilder();
    document =
    parser.parse(
    new InputSource(inStream ) );
    if (dataBlock != null) {
    inStream = new ByteArrayInputStream(StringUtils.getBytes(dataBlock));
    dataBlockDoc = parser.parse(
    new InputSource(inStream ) );
    Element root = document.getDocumentElement();
    Element payload = null;
    NodeList children = root.getChildNodes();
    //get Payload child from envelope document
    for (int i = 0; i < children.getLength(); i++) {
    if (children.item(i).getNodeName().equals("Payload")) {
    payload = (Element)children.item(i);
    break;
    //get the PayloadPlaceHolder
    Element payloadPlaceHolderElement = null;
    children = payload.getChildNodes();
    for (int i = 0; i < children.getLength(); i++) {
    if (children.item(i).getNodeName().equals("PayloadPlaceHolder")) {
    payloadPlaceHolderElement = (Element)children.item(i);
    break;
    Node newPayload = null;
    if (dataBlockDoc != null) {
    Element dataBlockElement = dataBlockDoc.getDocumentElement();
    //make new Payload element to replace old (empty) Payload
    newPayload = document.importNode((Node) dataBlockElement, true);
    payload.replaceChild(newPayload, payloadPlaceHolderElement);
    else
    payload.removeChild(payloadPlaceHolderElement);
    TransformerFactory tf = TransformerFactory.newInstance();
    Transformer nullTransform = tf.newTransformer();
    ByteArrayOutputStream oStream = new ByteArrayOutputStream();
    nullTransform.transform(                    new DOMSource( document ),
         new StreamResult( oStream ) );
    xml = new StringBuffer(oStream.toString());
    Thanks in advance.

    It appears that the problem is that the DOM serializer implementation in JDK 1.4 is not properly handling namespaces. Does anyone know of a workaround or alternate serializers we could use to serialize a DOM tree? I also need it to work with XSLT.
    Thanks.

  • XML Transformation Problem in JDeveloper 11.1.1.3.0

    Friends,
    I am trying to transform an XML using an XSL, by a Java program, which uses javax.xml.transform.Transformer.
    I have a Java project which has the above program and I have a Web project created, where i have the java project's jar in the WEB-INF/lib. And, when i tried to access the same java program from inside the web project, I am getting the following error:
    XML-22000: (Fatal Error) Error while parsing XSL file ({0}).
    oracle.jbo.JboException: XML-22000: (Fatal Error) Error while parsing XSL file ({0}).
    Code in ServiceAMImpl class:
    TransformerFactory factory = TransformerFactory.newInstance();
    template =
    factory.newTemplates(new StreamSource(AMImpl.class.getClassLoader().getResourceAsStream("text.xsl")));
    AMImpl.class.getClassLoader().getResourceAsStream("text.xsl") is returning NULL.
    Please help in resolving this error.
    Thanks much.

    Hi,
    I figured out the problem. The file was not in correct class path. Now it works fine.
    Thanks everyone.

  • Affine transformation with vector data

    I want to use the SDO_UTIL.AFFINETRANSFORMS method to transform vector data in a sql statement.
    The example in the Spatial Developer's Guide is working so far. But if I change the SCALING parameter to TRUE I got a exception:
    Fehler beim Start in Zeile 2 in Befehl:
    SELECT SDO_UTIL.AFFINETRANSFORMS(
    geometry => MDSYS.SDO_GEOMETRY(2003, NULL, NULL,
    MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1),
    MDSYS.SDO_ORDINATE_ARRAY(
    1.5,0,
    2.5,1,
    1.5,2,
    0.5,2,
    0.5,0,
    1.5,0)),
    translation => 'FALSE',
    tx => 0.0,
    ty => 0.0,
    tz => 0.0,
    scaling => 'TRUE',
    psc1 => NULL,
    sx => 0.5,
    sy => 0.5,
    sz => null,
    rotation => 'FALSE',
    p1 => NULL,
    line1 => NULL,
    angle => 0.0,
    dir => 0,
    shearing => 'FALSE',
    shxy => 0.0,
    shyx => 0.0,
    shxz => 0.0,
    shzx => 0.0,
    shyz => 0.0,
    shzy => 0.0,
    reflection => 'FALSE',
    pref => NULL,
    lineR => MDSYS.SDO_GEOMETRY(2002,0,NULL,
    MDSYS.SDO_ELEM_INFO_ARRAY(1,2,1),
    MDSYS.SDO_ORDINATE_ARRAY(2.5,0.0,2.5,2.0)),
    dirR => 0,
    planeR => 'FALSE',
    n => NULL,
    bigD => NULL
    ) FROM DUAL
    Fehlerbericht:
    SQL-Fehler: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException
    ORA-06512: at "MDSYS.SDO_UTIL", line 265
    29532. 00000 -  "Java call terminated by uncaught Java exception: %s"
    *Cause:    A Java exception or error was signaled and could not be
               resolved by the Java code.
    *Action:   Modify Java code, if this behavior is not intended.The methods TRANSLATION and REFLECTION are working - SCALING, ROTATION and SHEARING are not working.
    I test it on Oracle 11.1.0.7 on Windows XP and Windows Server 2003 R2.
    Maybe it's a similar problem which is described in Bug 9146920 on My Oracle Support.
    Has anybody had a similar problem?
    Regards,
    Cord

    Hi,-
    Please define psc1 instead of psc1 => NULL like:
    psc1 =>MDSYS.SDO_GEOMETRY(2001, NULL, NULL,
    MDSYS.SDO_ELEM_INFO_ARRAY(1,1,1),
    MDSYS.SDO_ORDINATE_ARRAY(0,0)),if you want scaling with respect to origin.
    Define psc1 like:
    psc1 =>MDSYS.SDO_GEOMETRY(2001, NULL, NULL,
    MDSYS.SDO_ELEM_INFO_ARRAY(1,1,1),
    MDSYS.SDO_ORDINATE_ARRAY(0.6,0)),if you want scaling with respect to another point (i.e., point *(0.6, 0)* which is) on your geometry.
    Please note that psc1 has to be on the geometry, and it can be any point
    other than the vertices of your geometry.
    Next, note also that you should _specify sz as zero even if you donot use it for 2D_ as you will see in the below examples.
    Hope that this helps and please let us know if you have further problems.
    I tried with (0,0) point for psc1 as follows:
    SELECT SDO_UTIL.AFFINETRANSFORMS(
    geometry => MDSYS.SDO_GEOMETRY(2003, NULL, NULL,
    MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1),
    MDSYS.SDO_ORDINATE_ARRAY(
    1.5,0,
    2.5,1,
    1.5,2,
    0.5,2,
    0.5,0,
    1.5,0)),
    translation => 'FALSE',
    tx => 0.0,
    ty => 0.0,
    tz => 0.0,
    scaling => 'TRUE',
    psc1 =>MDSYS.SDO_GEOMETRY(2001, NULL, NULL,
    MDSYS.SDO_ELEM_INFO_ARRAY(1,1,1),
    MDSYS.SDO_ORDINATE_ARRAY(0,0)),
    sx => 0.5,
    sy => 0.5,
    sz => 0.0,
    rotation => 'FALSE',
    p1 => NULL,
    line1 => NULL,
    angle => 0.0,
    dir => 0,
    shearing => 'FALSE',
    shxy => 0.0,
    shyx => 0.0,
    shxz => 0.0,
    shzx => 0.0,
    shyz => 0.0,
    shzy => 0.0,
    reflection => 'FALSE',
    pref => NULL,
    lineR => MDSYS.SDO_GEOMETRY(2002,0,NULL,
    MDSYS.SDO_ELEM_INFO_ARRAY(1,2,1),
    MDSYS.SDO_ORDINATE_ARRAY(2.5,0.0,2.5,2.0)),
    dirR => 0,
    planeR => 'FALSE',
    n => NULL,
    bigD => NULL
    ) FROM DUAL;
    SDO_UTIL.AFFINETRANSFORMS(GEOMETRY=>MDSYS.SDO_GEOMETRY(2003,NULL,NULL,MDSYS.SDO_
    SDO_GEOMETRY(2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1),
    SDO_ORDINATE_ARRAY(.75, 0, 1.25, .5, .75, 1, .25, 1, .25, 0, .75, 0))
    With (0.6,0) point for psc1, you will get:
    SELECT SDO_UTIL.AFFINETRANSFORMS(
    geometry => MDSYS.SDO_GEOMETRY(2003, NULL, NULL,
    MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1),
    MDSYS.SDO_ORDINATE_ARRAY(
    1.5,0,
    2.5,1,
    1.5,2,
    0.5,2,
    0.5,0,
    1.5,0)),
    translation => 'FALSE',
    tx => 0.0,
    ty => 0.0,
    tz => 0.0,
    scaling => 'TRUE',
    psc1 =>MDSYS.SDO_GEOMETRY(2001, NULL, NULL,
    MDSYS.SDO_ELEM_INFO_ARRAY(1,1,1),
    MDSYS.SDO_ORDINATE_ARRAY(0.6,0)),
    sx => 0.5,
    sy => 0.5,
    sz => 0.0,
    rotation => 'FALSE',
    p1 => NULL,
    line1 => NULL,
    angle => 0.0,
    dir => 0,
    shearing => 'FALSE',
    shxy => 0.0,
    shyx => 0.0,
    shxz => 0.0,
    shzx => 0.0,
    shyz => 0.0,
    shzy => 0.0,
    reflection => 'FALSE',
    pref => NULL,
    lineR => MDSYS.SDO_GEOMETRY(2002,0,NULL,
    MDSYS.SDO_ELEM_INFO_ARRAY(1,2,1),
    MDSYS.SDO_ORDINATE_ARRAY(2.5,0.0,2.5,2.0)),
    dirR => 0,
    planeR => 'FALSE',
    n => NULL,
    bigD => NULL
    ) FROM DUAL;
    SDO_UTIL.AFFINETRANSFORMS(GEOMETRY=>MDSYS.SDO_GEOMETRY(2003,NULL,NULL,MDSYS.SDO_
    SDO_GEOMETRY(2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1),
    SDO_ORDINATE_ARRAY(1.05, 0, 1.55, .5, 1.05, 1, .55, 1, .55, 0, 1.05, 0))Best regards
    baris

  • XML transformation problems - URGENT!!!!!

    Hi,
    I have a problem on writing data into XML files on Win NT/Tomcat platform from a servlet. This problem has been getting on my nerves for the past few weeks now. It was earlier giving a SecurityException: sealing violation error, when trying to write into the XML file using the Transformer object's transform method. What I need to do is, just read in data from the XML file first, do some processing and then dump in the results back in the same XML file.
    I managed to get rid of the Sealing violation exception now, by downloading the xalan2 package and giving the reference of the new xalan.jar in the classpath. I am using the JAXP Transformer class's transform method to change the XML document. But, the problem now is that it is throwing a NoSuchMethodError exception on the line where the transform(source, result) method is coded.
    This is the source code:
    private void writeXMLData(Node n) throws IOException
         Transformer transformer;
         StreamResult streamresult;
         DOMSource domsource;
         TransformerFactory factory;
         factory= TransformerFactory.newInstance();
         try
         transformer = factory.newTransformer();
         domsource = new DOMSource(n);
    transformer.transform(domsource, new javax.xml.transform.stream.StreamResult(new                FileOutputStream("d:\\tomcat\\webapps\\ROOT\\Orders.xml")));
         catch (Exception e)
              e.printStackTrace();
    transformer = null;
    factory=null;
    domsource= null;
    streamresult=null;
    This is the error that is thrown:
    java.lang.NoSuchMethodError: org.w3c.dom.Node: method getNamespaceURI()Ljava/lang/String; not found
         at org.apache.xpath.DOM2Helper.getNamespaceOfNode(DOM2Helper.java:348)
         at org.apache.xml.utils.TreeWalker.startNode(TreeWalker.java, Compiled Code)
         at org.apache.xml.utils.TreeWalker.traverse(TreeWalker.java, Compiled Code)
         at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java, Compiled Code)
         at test.TestOrderAdd_proto.writeXMLData(TestOrderAdd_proto.java:427)
         at test.TestOrderAdd_proto.doPost(TestOrderAdd_proto.java:228)
         at test.TestOrderAdd_proto.doGet(TestOrderAdd_proto.java:246)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:402)
         at org.apache.tomcat.core.Handler.service(Handler.java:287)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
         at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
         at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java, Compiled Code)
         at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java, Compiled Code)
         at java.lang.Thread.run(Thread.java:479)
    The classpath settings are:
    d:\jaxp-1.1\jaxp.jar;d:\xalan2\xalan-j_2_2_D9\bin\xalan.jar;d:\jaxp-1.1\crimson.jar (in that order)
    Could anyone please help me out with this problem?
    Thanks,
    Jatin

    I assume you're starting tomcat by using the tomcat.bat file. Keep in mind that this batch file adds every .jar file in tomcat's lib directory BEFORE your own classpath and it usually contains a parser.jar file, which might cause problems, it also contains a jaxp.jar.
    If you want to switch to xerces, remove jaxp and crimson from your classpath and add xerces.jar to it (xerces contains jaxp). In the case of tomcat, you'd need to delete parser.jar and add xerces.jar to its lib dir.
    Hope that helps.

  • Intermedia Image transform problem with Tifs 64k

    Hello, I have loaded a bunch of Tifs ranging in size from about 8k up to 120 or so kilobytes. When I try to do a scale transform on them and change them into GIFs using the image.process('scale="0.2"') command for example only the TIf images that are about 64k and under get processed; for the rest I get an unhandled internal exception. I am running Oracle 8.1.5 Enterprise Edition on a Sun Enterprise 250 with .5 gig RAM. Should I reconfigure how much ram is available to Intermedia and if so how do you do that?

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by John Wagner ([email protected]):
    Hello, I have loaded a bunch of Tifs ranging in size from about 8k up to 120 or so kilobytes. When I try to do a scale transform on them and change them into GIFs using the image.process('scale="0.2"') command for example only the TIf images that are about 64k and under get processed; for the rest I get an unhandled internal exception. I am running Oracle 8.1.5 Enterprise Edition on a Sun Enterprise 250 with .5 gig RAM. Should I reconfigure how much ram is available to Intermedia and if so how do you do that?<HR></BLOCKQUOTE>
    I directly got in touch with John, and his problem has been sold.
    He sent two Tiff images - a bad one and a good one. An image expert took a look at them. Here is his comment:
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>
    I took a look at these images and they seem
    to be "good" - i.e. they are not corrupted or
    in an unsupported format. I tried our new
    version and it handles them OK if a little
    slowly. I don't actually have an 8.1.x
    database up right now and it will take some
    time. But I think I see what the problem might
    be. I made a change to the image.
    What I did was use a utility to make the
    image "striped". The images were contained
    in one large "chunk" of pixels. TIFF images
    can also be striped, where the pixels are in
    much smaller chunks which means less
    memory is required to work with them. In the
    case of the 8.1.5 image code, there might be
    some spot where it can't handle this kind of
    TIFF image larger than 64k. By causing the
    images to be written with small chunks of
    data you can avoid this. The TIFF manual
    suggests that the chunks be about 8k; for
    this image that translates into about 500
    scanlines per chunk.
    <HR></BLOCKQUOTE>
    John tested this "striped" tiff image and
    successfully uploaded into the database.
    null

  • Push-Pull Inverter and Transformer Problems

    Hi,
    I’m new to the forums and wonder if someone can help me with a Multisim problem.
    Basically I’m designing a simple push-pull inverter comprising of a transformer with a centre tapped primary winding (TS Power), a 24V DC supply and two MOSFETS.
    The centre tap of the transformer is earthed and the 24V DC supply is connected to the two outer ends of the primary winding via each MOSFET.
    I’ve constructed a 555 timer circuit to provide a pulse train to fire the gates of each MOSFET in turn.
    My problem is that although I get the desired secondary waveform output (modified sine wave) the voltage magnitude doesn’t appear to relate to the transformer turns ratio?
    Am I doing something wrong?
    Many thanks for any advice in advance.

    Hi Woody,
    Thank you for your post and welcome to the forums. Please could you attach your circuit schematic to a reply post, I can then simulate your circuit myself and make suggestions where necessary.
    Many Thanks
    Jamie S.
    Applications Engineer
    National Instruments

Maybe you are looking for

  • Anchor objects on spread don't appear in pdf

    CS5 / Mac 10.6.4. Bug? I have multiple anchored objects in a long document. If the anchor reference is on the same page as the anchor object, all is fine on the pdf. If the anchor reference is on the opposite page (of a spread) then the anchored obje

  • Web.show_document - mailto

    Hi, I am using this command to send e-mail within Forms. web.show_document('mailto:[email protected]&subject=test&body=Hello','blank'); This command opens an outlook window message and the user have to press send to send the e-mail. Is it possible, u

  • RATE function in Essbase

    Does anyone know how to get an Essbase function equivalent to the RATE function in Excel?<BR><BR>Regards,<BR><BR>Pablo

  • Trouble Opening PDFs Downloaded From Web

    I have Adobe Acrobat Pro (10.1.6) for the latest Mac OSX and I can open and edit PDFs from others. But I cannot open any PDFs I download from the Web. I get the message "There was an error opening this document. The file is damaged and could not be r

  • Master Data "Simulate Update" and REAL update differences

    Hi there everyone. My issue is this. When I load my 0EMPLOYEE Master Data the new records are not written in the infoobject and I don't understand why? When I go to the Loading monitor, "Details" tab > Data package then right click and choose "Simula