Examples of EdsPoint


Examples of edsdk.bindings.EdsPoint

                                    final EdsRational struct = CanonUtils.getPropertyDataAdvanced( baseref, id );
                                    value = struct;
                                    break;
                                }
                                case kEdsDataType_Point: {
                                    final EdsPoint struct = CanonUtils.getPropertyDataAdvanced( baseref, id );
                                    value = struct;
                                    break;
                                }
                                case kEdsDataType_Rect: {
                                    final EdsRect struct = CanonUtils.getPropertyDataAdvanced( baseref, id );
View Full Code Here

Examples of edsdk.bindings.EdsPoint

            } else if ( EdsRational.class.isAssignableFrom( klass ) ) {
                final EdsRational struct = (EdsRational) value;
                result = new String( struct.numerator.longValue() + " / " +
                                     struct.denominator.longValue() );
            } else if ( EdsPoint.class.isAssignableFrom( klass ) ) {
                final EdsPoint struct = (EdsPoint) value;
                result = new String( "(" + struct.x + ", " + struct.y + ")" );
            } else if ( EdsRect.class.isAssignableFrom( klass ) ) {
                final EdsRect struct = (EdsRect) value;
                result = new String( struct.size.width + "x" +
                                     struct.size.height + ", (" +
                                     struct.point.x + ", " + struct.point.y +
                                     ")" );
            } else if ( EdsSize.class.isAssignableFrom( klass ) ) {
                final EdsSize struct = (EdsSize) value;
                result = new String( struct.width + "x" + struct.height );
            } else if ( EdsTime.class.isAssignableFrom( klass ) ) {
                final EdsTime struct = (EdsTime) value;
                result = new String( struct.year.intValue() + "-" +
                                     struct.month.intValue() + "-" +
                                     struct.day.intValue() + " " +
                                     struct.hour.intValue() + ":" +
                                     struct.minute.intValue() + ":" +
                                     struct.second.intValue() + "." +
                                     struct.milliseconds.intValue() );
            } else if ( EdsFocusInfo.class.isAssignableFrom( klass ) ) {
                final EdsFocusInfo struct = (EdsFocusInfo) value;
                // TODO: handle struct output
                result = struct.toString();
            } else if ( EdsPictureStyleDesc.class.isAssignableFrom( klass ) ) {
                final EdsPictureStyleDesc struct = (EdsPictureStyleDesc) value;
                result = new String( "\n    Color tone: " +
                                     struct.colorTone.longValue() +
                                     "\n    Contrast: " +
View Full Code Here

Examples of edsdk.bindings.EdsPoint

                case kEdsDataType_ByteBlock: //Byte Block // TODO: According to API, is either EdsInt8[] or EdsUInt32[], but perhaps former is a typo or an old value
                    return (T) memory.getIntArray( 0, size / 4 );
                case kEdsDataType_Rational: //EdsRational
                    return (T) new EdsRational( memory );
                case kEdsDataType_Point: //EdsPoint
                    return (T) new EdsPoint( memory );
                case kEdsDataType_Rect: //EdsRect
                    return (T) new EdsRect( memory );
                case kEdsDataType_Time: //EdsTime
                    return (T) new EdsTime( memory );
                case kEdsDataType_FocusInfo: //EdsFocusInfo
View Full Code Here

Examples of edsdk.bindings.EdsPoint

        public LiveViewZoomPosition( final EdsPoint value ) {
            super( EdsPropertyID.kEdsPropID_Evf_ZoomPosition, value );
        }

        public LiveViewZoomPosition( final long x, final long y ) {
            super( EdsPropertyID.kEdsPropID_Evf_ZoomPosition, new EdsPoint( new NativeLong( x ), new NativeLong( y ) ) );
        }
View Full Code Here

Examples of edsdk.bindings.EdsPoint

                    final String data = CanonUtils.getPropertyDataAdvanced( baseRef, property, param );
                    result = (T) data;
                    break;
                }
                case kEdsDataType_Point: { //EdsPoint
                    final EdsPoint data = CanonUtils.getPropertyDataAdvanced( baseRef, property, param );
                    result = (T) data;
                    break;
                }
                case kEdsDataType_Rect: { //EdsRect
                    final EdsRect data = CanonUtils.getPropertyDataAdvanced( baseRef, property, param );
                    result = (T) data;
                    break;
                }
                case kEdsDataType_Time: { //EdsTime
                    final EdsTime data = CanonUtils.getPropertyDataAdvanced( baseRef, property, param );
                    result = (T) data;
                    break;
                }
                case kEdsDataType_FocusInfo: { //EdsFocusInfo
                    final EdsFocusInfo data = CanonUtils.getPropertyDataAdvanced( baseRef, property, param );
                    result = (T) data;
                    break;
                }
                case kEdsDataType_PictureStyleDesc: { //EdsPictureStyleDesc
                    final EdsPictureStyleDesc data = CanonUtils.getPropertyDataAdvanced( baseRef, property, param );
                    result = (T) data;
                    break;
                }
                case kEdsDataType_ByteBlock: //EdsUInt32[]
                case kEdsDataType_Int32_Array: //EdsInt32[]
                case kEdsDataType_UInt32_Array: { //EdsUInt32[]
                    final int[] data = CanonUtils.getPropertyDataAdvanced( baseRef, property, param );

                    if ( data != null ) {
                        if ( klass != null &&
                             DescriptiveEnum[].class.isAssignableFrom( klass ) ) {
                            // DescriptiveEnum[]
                            final DescriptiveEnum<?>[] array = (DescriptiveEnum<?>[]) Array.newInstance( klass.getComponentType(), data.length );
                            for ( int i = 0; i < data.length; i++ ) {
                                array[i] = CanonConstants.enumOfValue( (Class<? extends DescriptiveEnum<?>>) klass.getComponentType(), data[i] );
                            }
                            result = (T) array;
                        } else if ( klass != null &&
                                    DescriptiveEnum.class.isAssignableFrom( klass ) ) {
                            // DescriptiveEnum
                            if ( data.length > 1 ) {
                                throw new IllegalStateException( "Only single result expected but multiple results returned!" );
                            }
                            result = (T) CanonConstants.enumOfValue( (Class<? extends DescriptiveEnum<?>>) klass, data[0] );
                        } else if ( klass != null &&
                                    EdsRect.class.isAssignableFrom( klass ) ) {
                            // EdsRect
                            if ( data.length != 4 ) {
                                throw new IllegalStateException( "Four values expected for an EdsRect!" );
                            }
                            result = (T) new EdsRect( new EdsPoint( new NativeLong( data[0] ), new NativeLong( data[1] ) ), new EdsSize( new NativeLong( data[2] ), new NativeLong( data[3] ) ) );
                        } else if ( klass != null &&
                                    EdsSize.class.isAssignableFrom( klass ) ) {
                            // EdsSize
                            if ( data.length != 2 ) {
                                throw new IllegalStateException( "Two values expected for an EdsSize!" );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.